I found this answer in the Flex India User Group mailing list today. The answer has been given by Saurabh Narula in response to a question by Khalid Chaudhary.
The question is this –
When we create a new Flex project using the FB IDE and immediately do a File->Export->Release Build, then the size of the resultant SWF file is roughly 160 – 170 KB. But if you use RSLs – rpc.swf, framework_188.8.131.5258.swz, framework_184.108.40.20658.swf and flex.swf – to compile your application, then the Size of the application’s SWF file is just around 60-70KB. How and why does the size of the SWF file go down?
The answer (given by Saurabh Narula) is –
Flex framework is nothing but a bunch of classes implemented over Flash Player APIs. When you create a flex project you are building a project using all the classes required to build your “Flex” project, so by default the flex framework which is close to 150kb would be included/compiled if you create a flex project. If you create an actionscript only project then you would see that flex framework would not be included by default and your swf size would be considerably low. Now, if the client request for a swf file (built using a flex framework), the flash player client will load the full swf file along with the framework classes, this will happen repeatedly.
If you compile using a framework RSL then your swf size would be cosiderably small, because your framework(RSL) would only be loaded once in the flash player(cached), repeated requests to the swf file would not load the flex framework classes as they already available to the flash player in its cache.
The goal of this post is to make this answer accessible to non-subscribers of the mailing list. Credit for the answer solely goes to Saurabh Narula.
Does that mean that everyone should compile their flex apps using RSL as a standard practice? I dont know, I will try it and post my observations on this blog. In the meanwhile, if you happen to be a Flex Guru reading this post, do share your thoughts on the whether its a good idea to compile flex applications using framework RSLs as a standard practice.