AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
774 stars 149 forks source link

Finding text in a large document stutters on first characters #430

Open Rekkonnect opened 5 months ago

Rekkonnect commented 5 months ago

If the finding matches too many occurrences, the control causes a stutter making sure that all occurrences are evaluated before accepting more text input and cancelling the find on the short text.

Example of large document: https://raw.githubusercontent.com/dotnet/roslyn/main/src/Compilers/CSharp/Test/Syntax/Generated/Syntax.Test.xml.Generated.cs

Typing "test" will cause a stutter upon typing "t", and then as the results diminish, the other letters will appear normally without any visible stutter.

danipen commented 5 months ago

We could review the sewch performance to see if we can improve it. I guess other editors such as VSCode/Sublime can do it without issues.

If the performance cannot be easily improved an option could be restricting starting the search for two or more chars (giving probably some UI clue about it)