I am working on a strategy for managing and delivering a
large application as a series of smaller application that load and
cache on demand. Most of the architectural issues have been solved
and I am starting to experiment with controlling the individual
application file size.
The first observation looking at the projects resources and
reading the docs is that each app merges in the parts of the mx
library and custom components that it needs. I understand the
reasons behind this but the shared parts of the mx library and
custom components are essentially loaded twice as they are embedded
in each application.
I understand that I can control the duplication of the custom
components by placing them in a library and linking via RSL, but
what about the duplicated mx components, I understand that all apps
may not use exactly the same manifest of components but in this app
there is a lot of duplication as each app uses many of the same mx
I have not experimented with changing the linking on the mx
components and do not know if it’s even possible.
What is a good strategy for loading the a subset of the mx
components only once and decreasing the individual app size?
I guess I am missing something, the main flex library is just
over 1 meg, if you add in charting it’s close to 2 megs.
When you create a project and start adding applications to it
even small ones are around 200 – 400 K each and they seem to
each contain copies of the dependencies, so it appears that each
app in the project contains merged code, the needed parts of the
So in a medium size app why not load / cache the framework
libraries once and have apps that range from 10 – 20 K.
In a project you would normally have a main app that is a
loader for the child apps, so the child apps don’t need to
contain the dependencies already loaded when the main app loads,
however based on the file size it appears that each app contains
it’s own copy of the parts of the framework it needs.
So even better would be a way to have flex know that a main
app will always be loaded first so it does not embed identical
resources into each child app.