I have a Flex application where load time is extremely important (consumer site). I want to get something on the screen, and then allow the loading of additional modules as needed.
The problem I am facing is that the total amount of all modules is much larger than if I included all the components in a single .swf file.
This is pretty obvious. For example, the classes required to access a web service seem to be approximately 100 kb. If I do not use these classes in my main.swf, then they will be included in the EVERY module that uses them. So, if I have 5 modules, then the extra 500 kB is wasted.
In theory, I want 3 levels
main.swf - the minimum possible layout / style / font / type of the common.swf framework - additional classes required by module 1 + module 2 (for example, web services) module1.swf - module 1 on the site module2.swf - module 2 on the site
I do not know if this is possible.
I am wondering if I can upload swz / swf files for parts of the framework instead of the whole structure.
I really need to get my main application size up to 200 KB. It increases to 450KB when I add web services and basic datagrid features.
Any lessons learned would be appreciated.
Simon source
share