Monday, March 9, 2009

Saving filesize in a Flex app

I'm starting to use modules to try and get the filesize down in Baha'i Explorer. This has helped bring the initial load down from 380kb to 280kb. Although the separate modules add up to more than the original size, it does make it a quicker to load initially. Two other things to keep in mind to keep the file sie down are these compiler options:

-optimize=true;

If set to true, it enables the ActionScript optimizer. This optimizer reduces file size and increases performance by optimizing the SWF file's bytecode. The default value is false.

In my case setting it to true saved 50kb

Also, make sure to set the debug option to false when you are deploying :

-debug=false

This can save nearly 100kb.

For additional compiler options: click here >