UI is unresponsible while module loading

Topics: Prism v4 - Silverlight 4
Apr 28, 2011 at 4:41 AM

Hello, I have the following problem: when loading module on demand (or not) there is some delay before module loaded and during this delay UI is unresponsible.

How can I prevent this?


I've created test solution with empty but working module and tried to load it. Module was loaded nearly instantly. This is good.

Next, I put some large file in module project (some data file just to enlarge size of xap) and set it build action to Content to add this file in xap.

Then tried to load this module and get significant delay and UI was freezed while module loading. This is bad.


I looked in weblogger and saw this:


Whole time UI is freezed was module loading time.

Isn't supposed that SL connections are asynchronous and don't hang UI thread?

How I can workaround this?


Here is test solution, just add some large file in module project and set build action to content.

http://www.megaupload.com/?d=TVO5GCAZ .


Sorry for my English.


Apr 28, 2011 at 2:27 PM


We've checked the sample application you've sent us, and found that the module loading process is done asynchronously. This is because the MefXapModuleTypeLoader calls the DeploymentCatalog.DownloadAsync method to download the modules that are being downloaded in the background.

You could check the Modularity QuickStart, where you might find a possible way to load modules in the background without hanging the UI thread.

I hope you find this helpful.

Guido Leandro Maliandi

May 18, 2011 at 4:55 AM

Thank you. The problem seems to be with the DeploymentCatalog.DownloadAsync.