9

I currently use DevExpress controls heavily in an application. The controls are great and speed-up development time dramatically (and hence, I wouldn't want to ditch them) however, I have a few issues with their performance.

My application is a Shell/Modules/Views&ViewModels application (it follows a lot of the design patterns you would find in Prism).

When a view is first loaded it takes an extremely long time to display (on some of my users PCs with slow machines we're talking 5+ seconds of just hanging there). The time it takes apparently depends on the usage of DX controls (how many ones are on there that haven't been seen before by the application).

When you destroy the view and re-open it, it opens in less than a second. The ViewModel in my test cases/performance profiles has been made to re-create each time - so there is no shared state within my code between invocations of the view (no singleton injected objects).

After a bit of discussion and research I appear to have narrowed down the problem to on-demand loading of the template files for the DX controls. There is a thread here about that: http://www.devexpress.com/Support/Center/Issues/ViewIssue.aspx?issueid=Q382256 which references: http://www.devexpress.com/Support/Center/p/B201967.aspx & DevExpress controls for WPF load time The solution described in these threads is to either display a loading indicator or to use a hidden window with controls on it at start-up. Neither of these options are something I'd like to do (and the hidden window option didn't appear to gain much performance when I tried a simple example, interestingly - which also suggests that I might be missing something).

What I am hoping to do is to pre-load template files that I know I'm going to need on a background thread. Is there any way I can do this in WPF? (I'm thinking this is more a general WPF thing rather than a DevExpress thing - even if it's something that needs to be implemented in the DX libraries themselves).

Any ideas for either me or the guys at DevExpress?

Community
  • 1
  • 1
David
  • 682
  • 2
  • 9
  • 15

1 Answers1

0

What you can do in the background thread is to preload all the required assemblies. Also make sure they are nged-ed. The UI controls need to be initialized from the UI thread.

Bohdan
  • 1,987
  • 16
  • 23