Anybody who has been involved with large Flash projects immediately recognizes the value of performance tricks that descrease compile time limbo. My current project gets a speed bump by using MTASC + as2ant for compiling actionscript. Unfortunately the asset library still requires a Flash compilation step which is now on the order of 1-2 minutes on a Macbook Pro 2.16ghz with the 7200RPM drive.
Awhile back, my buddy Matthew mentioned that mounting a RAM disk may help speed up Flash compiles. Fast forward two months and we’re busy doing a branded interface for a very large and very important business partner. The asset library and its painfully slow compilation has become a bottleneck in development cycle.
I have been evaluating SWFMill and know thats where I want to go for doing incremental asset compilation and linking, not to mention the ‘natural entry point’ building technique. However, our project just isn’t at a point where we can invest two weeks to get the asset library ported over. How big is this asset library? Try 500 items. Yes, its fat and needs to be refactored badly.
So I look at the RAM disk approach seriously, just to be sure I’m not missing a simple performance gain. RAM disk, in concept, should remove any I/O latency incurred by the disk. That’s assuming of course that your OS isn’t already doing file caching.
OS-X with its BSD underpinnings *does* file caching.
Just to prove things, I ran compile times with Flash/Eclipse loaded from normal disk and compared them to the same environments loaded from RAM disk (working in the RAM disk as well).
RAM disk compile times
- MTASC + as2ant, compile run #1 = 24 seconds
- MTASC + as2ant, compile run #2 = 23 seconds
- Flash, compile run #1 = 60 seconds
- Flash, compile run #2 = 58 seconds
Normal disk compile times
- MTASC + as2ant, compile run #1 = 23 seconds
- MTASC + as2ant, compile run #2 = 23 seconds
- Flash, compile run #1 = 62 seconds
- Flash, compile run #2 = 60 seconds
In conclusion there is good news and bad news
- Good news - OS-X file caching works as it should
- Bad news - I still have a development cycle bottleneck