Reducing SWF File Size
24/01/2010
I was finishing up my current project, which I will cover in my next post, and I’ve noticed one small thing that makes a huge difference. I don’t know if it was covered before, so I may be late for this, but check this out. When using FlashDevelop, which I do for almost all of my projects, selecting “Release” configuration over “Debug” one actually reduces SWF file size.
I’ve compiled my project few times, nothing was changed in the code, I was only switching between two configurations and my results are: 240567 bytes for debug configuration and 169765 bytes for release one. That’s over 1.4X SWF files size cut! And the sad thing is I was googling on how to reducing SWF file size occationally over the past few months. Turns out debugger puts a lot of junk inside the code which make file size bigger. Usually there are no reasons for production SWFs to have debugger stuff in them, so unless testing it’s best to always compile using Release config. It runs faster than debug version too.
Now I have to recompile all of my previous projects…