Generating Flash Style “Size Reports” in Flex Builder

As I continue the transition from building ActionScript executions in Flash to going with a Flex-only method, I came across something I hadn’t tried in Flex before: size reports.

The Flex debugger provides an “uncompressed” size of your application in the trace output, but there’s no obvious way in the UI to show that breakdown. Being that Flex’s guts are in the command line, however, that’s where we can generate the size report.

If you check out your project preferences, click on ActionScript Compiler and add the following to the text field under “Additional compiler arguments:”

-link-report output.xml

where “output.xml” is the path to the file generated.

project_dropdowncompiler

Once you’ve got your file (which is really a thorough report on class linkage and more), though, you’re not yet done; if you open it up and take a look, it’s quite confusing.

size-report

Fortunately, there are a couple apps that will parse and clearly display the size report. I haven’t really tested them fully, but both look promising:

ItDepends by Joe Berkovitz

AIR Link Report Visualizer by kahunaburger

h/t to Tim Walling for help on this