You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BiDiAlgorithm.ProcessIsolatedRunSequences has O(n²) complexity, and in case of regular left-to-right european alphanumeric texts its calculations even do not affect anything.
To Reproduce
Add TextBlock
Set text to a very long line (i.e. 30kb)
Perform frequent measure (i.e. window resize) - there will be significant freezes
Expected behavior
No response
Avalonia version
11.2
OS
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
@Gillibald perhaps, if I understood the code correctly, I can suggest the following easy fix, not as fast as detecting and disabling processing completely, but it at least in most cases reduces complexity from O(n²) to O(n). As far as I understand applying rule W2 makes sense only if there are arabic letters, so changing this condition to (hasEN && hasAL) will reduce freezing, if there is no arabic text in the long line. I tried it, textboxes with 30kb sometimes lag a bit, but at least they do not hang the app completely.
Describe the bug
BiDiAlgorithm.ProcessIsolatedRunSequences has O(n²) complexity, and in case of regular left-to-right european alphanumeric texts its calculations even do not affect anything.
To Reproduce
Add TextBlock
Set text to a very long line (i.e. 30kb)
Perform frequent measure (i.e. window resize) - there will be significant freezes
Expected behavior
No response
Avalonia version
11.2
OS
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: