Increase WPF controls for resource loading

I am currently using DevExpress controls in the application. The controls are great and speed up development time (and therefore I do not want to stop them), however, I have a few problems with their effectiveness.

My application is the Shell / Modules / Views & ViewModels application (it follows the many design patterns you'll find in Prism).

When the view is loaded first, it takes a very long time to display (on some of my computers users with slow machines we are talking about 5+ seconds that just hang there). The time it takes, apparently, depends on the use of DX controls (how many of them are there that were not previously seen by the application).

When you destroy a view and reopen it, it opens in less than a second. The ViewModel in my test cases / performance profiles was created to be re-created every time - so that in my code there is not a single common state between the general view call (no unidirectional objects).

After a bit of discussion and research, I seemed to narrow the problem down to loading template files for DX controls on demand. There is a topic here: http://www.devexpress.com/Support/Center/Issues/ViewIssue.aspx?issueid=Q382256 which are referenced: http://www.devexpress.com/Support/Center/p/B201967.aspx and DevExpress controls for WPF boot time The solution described in these threads should either display a download progress bar or use a hidden window with controls at startup. None of these parameters is what I would like to do (and the hidden window option did not show much performance when I tried a simple example, interestingly - which also says that I can miss something).

What I hope to do is preload the template files, which, as I know, I will need in the background thread. Is there a way to do this in WPF? (I think this is more of a general WPF article than a DevExpress thing - even if this is what should be implemented in the DX libraries themselves).

Any ideas for me or guys at DevExpress?

+6
source share
1 answer

What you can do in the background thread is to preload all the necessary assemblies. Also make sure they are installed. User interface controls must be initialized from the user interface thread.

0
source

Source: https://habr.com/ru/post/914613/


All Articles