Any way to analyze the size of the SWF embedded in Flex?

I have a Flex application that seems bigger than it should be. It has a lot of code, but not a lot of assets, and it just seems great, but I'm not sure how to figure out where the space is going.

I know the -link-report parameter, but it only gives the sizes of the library-related library classes. I am very interested to see a report on the sizes of all classes and resources in my application, and this would be a huge bonus if I could also view their dependencies. Not knowing how the code is compiled, I'm not sure if this is possible, but it seems like this should happen, since the compiler can give me the sizes of individual classes associated with other libraries.

I searched a little, but did not find anything useful. Everything points to methods for optimizing the modulation and external links of libraries that I understand and implement, but I would really like more detailed reports on how my compiled application looks.

To be clear, I don’t really like the tips on how to reduce the file size, just a report of what is used and which classes refer to what.

Does anyone have any ideas?

CORRECTION. The link report shows all classes. In my particular project in Flex Builder, there were several CSS files meant to be compiled into swf. My main application link report has been overwritten by these css compilers!

+4
source share
3 answers

The link report actually contains all compiled classes, not just external libraries (at least with the Flex 4 SDK). There is xsl that will generate an html link report file to make it easier to read.

Check this post: http://blog.iconara.net/2007/02/25/visualizing-mxmlcs-link-report/

+3
source

swfkit.jar has a command line utility called flash.swf.tools.SwfxPrinter that comes with Flex Builder (or a plugin or SDK) that you can use to analyze class size information. Joe Berkovitz wrote some good instructions on how to use it on his blog, and he worked on an AIR-based GUI tool that uses this, but I'm not sure if he ever published a tool. However, you can use its instructions to use the utility directly from the JAR.

+3
source

I found a handy little AIR application that really helps organize link information.

http://www.kahunaburger.com/2008/03/08/air-link-report-visualizer/

It is old, but still works very well.

+1
source

All Articles