Module Loader perfomance tunning

Topics: Prism v2 - Silverlight 4
Jan 23, 2012 at 8:55 PM

I am working on an application where there are several modules(.xap files) that need to be downloaded, i am looking at ways to speed up the download of the xap files; apart from reducing the size of the xap files is there any other technique that could help improve the xap downloading process on the client browser?

Appreciate any type of suggestions; Thanks!

Developer
Jan 24, 2012 at 5:46 PM

Hi,

As far as I know the recommended approaches in the Prism guidance to achieve this are the ones mentioned in the following chapter of the Prism documentation:

There you will mainly find two suggestions:

  • Avoiding the duplication of shared class libraries among multiple module XAP files
  • Using application library caching

If you are using Application Library Caching it's important that all referenced assemblies should have the right metadata files collocated with them to ensure that they are not included in the corresponding XAP file. Also take into account that this approach is meant to improve startup performance when users revisit your Web site.

Additionally, I believe in cases where multiple modules are loaded and used at the same time, such as presenting views at the startup of the application, you could consider packaging them in a single XAP file, which might make the download slightly faster. As there is a small amount of performance overhead involved in making two downloads instead of one, even if it is the same total download size. However, this will deppend mostly on your personal preferences and the requirements of your scenario.

Also, note that, as this is not strictly related to Prism, I believe you might find better support in the Silverlight forums.

Regards,

Agustin Adami
http://blogs.southworks.net/aadami