Friday , 22 August 2014
Home » Silverlight » Performance » Pros and Cons of application library caching and GPU acceleration in Silverlight

Pros and Cons of application library caching and GPU acceleration in Silverlight

Reduce XAP size by using application library caching

Advantages

This reduces the XAP size by allowing those libraries configured with a dllname .extmap.xml file to be placed in individual zip files. These zip files will be requested as part of the initial XAP download.

The advantage comes in two scenarios. First if you update your code and rebuild the XAP most of the time the only thing that changes is the XAP, zip files remain unchanged. Hence when a client revisits your app and needs to download the latest version it may well be that only the XAP gets fetched, the zips being the same get served out of the browser cache (probably after a "304 Not Modified" response from the server).

The other scenario is where you have multiple SL applications on your site. They will share the same zips and therefore the total download for multiple apps is much reduced.

Disadvantages

For a one off application the first client visit will be a download at least as expensive if not more expensive than had the all the libraries been kept in the XAP. In some uses (high number of unique visitors of a site with a single app) it may be more desirable to keep the single XAP, especially if the XAP itself doesn’t change that often.

Where there are multiple XAPs sharing the same set of library zips there is a danger of "DLL Hell". Potentially someone can update a XAP which uses newer versions of libraries that the other XAPS have not been tested with and inadvertently break all the other XAPS. There are good practices that can eliminate this problem but it takes a little more effort than flicking on the Checkbox.

Conclusion

In light particularly of the second disadvantage I think it was a sensible choice not to default this feature on.

Use GPU Acceleration

I’m not going to go into the advantages/disadvantages of this. Just answer why its off by default.

You don’t get any advantage by just turning it on, you need to enable which elements in the XAML will get to use it via the CacheMode property. In addition depending on what you are doing this may still not bring you any advantages.

Just turning it on will consume extra resources such as video memory, you wouldn’t want that to happen unless you’ve specfically gone ahead used CacheMode at least somewhere in your app and hopefully where it would make a real difference. Also it is possible to get it wrong and make things worse.

About admin

Let me first introduce myself.... Sudhir has done my Engineering in Information Technology form Lingaya's Institute of Management and Technology Faridabad, India. Sudhir has worked on VC++, MFC, COM, C++, C Sharp, ASP.NET, Sharepoint and on Latest Web 2.0 stuff Jquery, Ajax. Currently Sudhir Mangla is working as Team Leader (architect ) (Silverlight , C Sharp, ASP.NET, Sharepoint and on Latest Web 2.0 stuff Jquery, Ajax) developer in Svam International, Noida.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>