wpfui icon indicating copy to clipboard operation
wpfui copied to clipboard

`RichTextBox` / `FlowDocument` causes significant slowdowns in rendering

Open sanewsome opened this issue 2 years ago • 4 comments

Updated to 1.2.4. Using .net5.0,

Using navigationfluent, buttons are not responsive for a few seconds unlike 1.2.3 where its instant.

Click on one of them to go to a series of CardExpanders and they take longer to open, and also freeze just before closing completed.

Not sure what is causing it, but CPU usages is also sat around 20% (AMD Ryzen 7). Visual studio reports an extra 100mb RAM in debugging process too.

Go back to 1.2.3 and issues disappear. See recordings below. No changes between 2 apps bar updating wpfui.

https://user-images.githubusercontent.com/31412306/165291456-b2f60c98-9e22-4fa9-ad11-bef18e3e1137.mp4

https://user-images.githubusercontent.com/31412306/165291459-d64df0b3-915b-4fa5-adb8-a43dc1467ea2.mp4

.

sanewsome avatar Apr 26 '22 11:04 sanewsome

@pomianowski 1.2.6 is the same

sanewsome avatar May 02 '22 20:05 sanewsome

@pomianowski 1.2.7 is somewhat better, however I think I've unconvered the control that might be causing an issue.

If the content is in a TextBox control, performance is far better.

If its in a RichTextBox with a flow document and Paragrap, theres the pause before fully closing.

sanewsome avatar May 21 '22 12:05 sanewsome

Maybe modifying the size of the RichTextBox and thus its complicated structure causes rendering problems.

pomianowski avatar May 21 '22 13:05 pomianowski

Its something in the flowdoc, but have not done much digging. TextBox is fine so will just use that and do without highighting for now!

sanewsome avatar May 21 '22 13:05 sanewsome