I am trying to optimize a few library projects I have for deployment. I have read Optimizing RSL SWF Files and have run this command on my decompressed library swc file folder (library.swc plus catalog.xml):
optimizer -keep-as3-metadata="Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient" -input /path/to/swc_folder/library.swf -output /path/to/swc_folder/output.swf
It cut the swc file down in size by more than half, which is great! Still haven't used it yet, that's the next mission.
But my question is, how do I manage the assets/resource-bundles in the decompressed folder, many of which I don't want. The unix command "ls -Rla" shows all the files in the decompressed swc:
First, I am not using any of those pngs in my project, so how do I get rid of them? And second, for the resource bundles, if I have 5 library projects all using the same bundles (plus a few of their own), how do I extract them out of this swf/swc and make them all reference the same one, so I can cut down on size/duplication? Can't seem to find this kind of detail anywhere.
Thanks so much for your help, really looking forward to some good compression/optimization
The first step is understanding the difference between SWC and SWF files.
SWC files are for authoring - they contain all possible information needed by tooling and for authoring. This includes debug symbols, icons for the components panel, embedded resources, etc.
SWF files are for deployment - they only contain the minimal information needed at runtime.You can choose more information, like debug symbols and/or line information, which will affect the size of the SWF. The optimzier tool can be used to strip this extra information out of a SWF file.
RSLs are just SWF files that are loaded at runtime. SWZ files are just signed RSLs.
I would not be concerned about the size of SWC files. SWF files are a different story, and should be made as small as possible.
Hope this helps,
Mmm.. I see, thanks. So the stuff outside the library.swf is just stuff required for flex builder and debugging. Not included in the swf. Got it