microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.25k stars 671 forks source link

TextBox/RichEditBox performance issues in text selection #9498

Open tingjiangcao opened 4 months ago

tingjiangcao commented 4 months ago

Describe the bug

RichEditBox control

Selection text process (fixed start point, constantly changing end point), selection animation is not smooth. In wpf and winui2 it's smooth.

This should be a winui3 problem, I also found it not smooth in my own application. The reason why it doesn't feel smooth could be because of the selection speed or because the animation frame rate is not enough.

Steps to reproduce the bug

Selection text process (fixed start point, constantly changing end point), selection animation is not smooth. In wpf and winui2 it's smooth.

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

github-actions[bot] commented 4 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kmgallahan commented 2 months ago

@tingjiangcao Can you modify the title to indicate that this applies to all TextBox controls and is focused on text selection lag?

@codendone I've found that TextBox text selection is slow/laggy mostly only during horizontal selection. When moving the cursor up and down text selection behaves as expected.

This can be seen in the latest WinUI 3 Gallery:

Screenshot 2024-06-07 082636

Unlike #7018, I'm not swinging a cursor around for long periods.

Unlike #7122 I'm not working with a large amount of characters.

Rather, I typically only have a few hundred characters that I'm trying to select a portion of to do copy+paste, and there is consistently laggy cursor behavior which is annoying (especially considering it can be updated quickly when moving vertically).