lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.38k stars 713 forks source link

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

Open sanewsome opened 2 years ago

sanewsome commented 2 years ago

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 commented 2 years ago

@pomianowski 1.2.6 is the same

sanewsome commented 2 years ago

@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.

pomianowski commented 2 years ago

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

sanewsome commented 2 years ago

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!