Flex 3 File Size – Export Release Build, Framework Cache
Reduce the size of your Flex application. In Flex 3, they’ve changed the way to use the debug swfs. Before, if you would Debug your app, it launched /myApp-debug.swf or if you just Ran it, it would launch /myApp.swf. It now seems to be all rolled into one swf for both Run or Debug. So if you’re going to push a release to production or anywhere online, make sure to use Projects->Export Release Build… for it. It takes out the debug information and copies the assets to a new folder.

This will take good chunk out of your application size. It took my latest project down from 840KB to 521KB.
If you want to take it down even more, then use the new Flex framework caching. This was something that we rallied to get from Adobe since Flex 2 and finally did! It can be found under Properties->Build Path->Library Path, and set Framework linkage to RSL.

I won’t go into the specifics of it, but it will put two files (framework_3.0.0.477.swz and .swf depending on your build number) in your release folder which you will need to include when you post a build. Also it requires use of Flash Player 9.0.115. For the same project it took the size from 521KB to 263KB! With these two options it cut the app down to almost 1/3 the originial size! Sweet!
Also as a sidenote, in Flex 2, I have run into some intermittent issues when using RSLs where the application would always look for the debug version. So I always had to compile with “-debug=false” in order for it not to throw up the debug message. I imagine that specifying the default option in flex-config.xml would also work, but it’s a pain to continually open another file.
3 comments3 Comments so far
Leave a reply
Hi,
What do you mean by Flex framework caching? I went to Properties->Flex Build Path->Library Path but nothing there.. Is it because I don’t have Custom Libraries? There is a Framework linkage, Is that the one you’re talking about? Nothing there that says “Flex framework caching”.. Please enlighten me …..
Yes, use the framework linkage. I added a screenshot.
Hi, any idea how to achieve the same small file size with Flash Develop? I try using debug and release, but in both cases it’s bigger than the FB3 Release Build…