Wed 14 Jan 2009
Cutting the fat out of a compiled StyleSheet (at least 10x the file size).
Posted by Mike under flex tips[2] Comments
This one seems weird to be but I guess I didn’t notice it earlier. As we all know Styles set as an external source need to be compiled first, which even for a modest application pushes this up to about 100k or so. I thought this was a bit heavy but didn’t think of it any further.
What the documentation tells you about Modules fails to mention that you can most certainly do the same thing when running the compiler on your compiled.swf stylesheet.
Run the stylesheet builder with the
against the
and instantly save at least 10x the file size (at least this is what I experienced), as it went down to about 10-12k or so.
mxmlc -link-report=myapplication.xml -output=myapplication.swf MyApplication.mxml
mxmlc -output=mystylesheet.swf -load-externs=myapplication.xml MyStyleSheet.css
Instant savings.
January 22nd, 2009 at 6:17 pm
I kept getting stack overflow errors when I tried to interact with your FlexBlog.
February 14th, 2009 at 3:39 am
Unfortunately that’s not incredibly surprising. I’ve more or less had to put that app in suspended mode, as life with little kids and a demanding job (the Flex I actually get paid for) has all but eaten up so much of my time, regardless of my bank account situation (overflow): I haven’t even had time to take a vacation to unwind and snowboard for a week. Damn, oh well.