My friend Lar sent me a brief post by Mike Britton about optimizing Flex SWF files. Since we use a lot of Modules in our development, I thought I would give it a try. In each of your Module Project files, place the following argument :
into the Flex Compiler – Additional compiler arguments field. This could save you about 20 – 40% in Module SWF size. It does not work in all instances and I am not sure exactly why it does for certain Modules and not for others.
The other optimization trick is to create a Shared code library that loads into your main application. This should contain any common managers and also items that may be used across multiple modules, like the List for example. This will decrease the size of your external Modules. Remember to include a link report fro the Shared library (–link-report=C:/shrclasses.rpt) and to include the argument load externs (–load-externs=C:/shrclasses.rpt) into each of your Modules.