AIR Link Report visualizer
The Flex compiler has a rarely used feature called “link-report”. Using this option instructs the compiler to create a report of all symbols that went into the compiled application as well as a list of all external references. The Reducing SWF file sizes livedocs-page has more information about link reports.
To enable it, you would either modify your Flex projects’ compiler settings:

or you would use “-link-report output.xml” as an option on the mxmlc command line. In either case, an XML file with all definitions will be created after the compiler successfully built the SWF-file.
The contents of the link report file look like this:

Hmmm – not very easy to digest by just reading the file in a text-editor. Theo Hultberg over at iconara.net created an XSL-script that transforms link-reports into human-readable HTML. While this is interesting, it did not give me the “big picture” for all the pieces that go into my applications.
I created an AIR application which can read, digest and visualize link-report files.
After installing the LinkReportAIR application, you can use the “Browse …” button to select a link-report XML file on your system or alternatively just drag and drop an XML-file on the AIR application itself.

The DataGrid on the left lists all symbols included in the report (under “id”), the modification date for the symbol (if available), the package it is included in, the size of the symbol and the optimized size (if available). You can use the DataGrid headers to sort the symbols using any of the columns.
All symbols that do not have a package associated with them are automatically assigned to a package called “global”. Any symbol that ends in “_properties” is assigned to a package called “properties”.
If you click on any of the symbols in the DataGrid, the bottom portion will show you where this symbol comes from (this can be a SWC or any of your sources) and whether is has “prerequisites” or “dependencies” associated with it (the livedocs link above has more details about these):

The neatest feature of LinkReportAIR is the little treemap (using ILOG Elixir) that is automatically created from the data in the link report. It tries to visualize the space consumption per package. In the screenshot below, I’m hovering over the “mx.controls” package (and all packages included in it) and LinkReportAIR tells me that the (unoptimized) size of everything contained under mx.controls.* is roughly 500 KBytes and that this equals about 25% of my applications total size.

Double-clicking on a package in the tree-map will “drill down” and allows you to focus on certain portions of the package tree. While “drilled down”, the DataGrid on the left will also be filtered to only show symbols in the current drilled down subtree. To get back to the entire view, you would double-click again on the subtree-symbol that is currently in focus (sounds complicated, but you’ll get it once you use it).
And finally the “External Symbols” tab will show all symbols that are externally required (like the stuff that’s exported from the Flash Player itself). That list will grow if you decide to link the Flex Framework externally via Runtime Shared Libraries (RSLs):

You can download and install the AIR application using the badge below. If you need a sample link-report file to play with, then use the one that I generated from the application itself: link-report.xml (use “Save Link As …” to save the report locally)
March 9th, 2008 at 3:13 am
Very cool stuff!
March 9th, 2008 at 11:31 pm
Thanks. It’s a very useful tool to have.
Can I start asking for enhancements ๐
1. Ability to re-adjust and allocate more screen space to Treemap by reducing width of Symbol definitions.
2. More color variations in Treemap – at present most of the stuff is in blue.
March 10th, 2008 at 8:04 pm
great AIR app! it’s very useful and intuitionistic.
October 2nd, 2008 at 6:13 pm
Awesome work man, this is incredibly helpful!
October 6th, 2008 at 3:31 pm
Hi,
Thanks. Nice tool. I have a quick request.
It would be nice to be able to double click on an element in the dependency list, and have that element selected in the definition list. This would make it very quick to navigate the dependency graph. You could do the same for the pre-requisite list, although that would be less useful.
http://screencast.com/t/hXod7dKA
January 30th, 2009 at 11:17 am
Robin – no idea why I missed your comment, but the feature you asked for has been added to the Link Report Visualizer. I also updated to AIR 1.5. Sorry about the delay.
Tobias
February 19th, 2009 at 3:24 pm
Awesome! Thanks so much for this great app! ๐
February 25th, 2009 at 9:47 am
Very nice, thanks!
March 5th, 2009 at 10:03 am
Can you please share the LinkReportAIR application code?
May 18th, 2009 at 2:36 pm
[…] I just found this air application for link report […]
December 14th, 2009 at 7:51 pm
Hey – This is a great forum
Just registered and wanted to say hello.
January 29th, 2010 at 1:57 pm
This is great, thanks a lot. The treemap is especially helpful for an overview.
September 27th, 2010 at 11:47 am
Very cool app, extremely useful!
October 22nd, 2011 at 9:29 am
Oh wow. I wish I had found this sooner. What an awesome and helpful tool. Thanks.
February 23rd, 2012 at 1:14 pm
Appreciate it a lot!
April 5th, 2014 at 6:28 am
This application is a bit powerful: http://evgeniy-polyakov.github.io/link-report-analyzer/
It allows to get nested dependencies and filter them by name.