Reducing Silverlight XAP file size

I’ve recently spent some time looking around for information on reducing the size of the compiled XAP file for our Silverlight web app.  We have a fairly hefty solution which compiles into a XAP of around 2.5meg.  Given the size and complexity of the app – that’s not a bad starting point, and I’m still aware that there is a lot we can do to reduce its size pre-compilation.

I’m fairly confident we can reduce this by optimising code and controls (icons in Controls project currently about 2Mb pre compilation), but by the time we’ve finished it’s still relatively weighty.  We’ve aimed to remove all images from the project, and all our icons (40+) are XAML user controls – which seem to compress pretty well.

Options to reduce the size of the XAP are plenty; the simplest being just re-compressing the XAP (change file extension to .ZIP, un-package and recompress using WinRAR or similar)… I took 1Mb off our Design solution’s original 3.7Mb just doing this.

That sort of percentage seems consistent with the other methods I’ve detailed below… the latter two can be set as post-build events to save the trouble of manually extracting and compressing the compiled XAP.

This work is licensed under a Creative Commons license.
This entry was posted in Development, Silverlight and tagged , , , . Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.

One Trackback

  1. [...] [...]