And I had no idea. I've been working with the Flex SDK for a while now and I find it very slow to say the least. Actually, compared to MTASC or haXe compilers is just painfully slow. So I thought about giving a go to Google and the oracle has spoken: there's a toy called Flex Compiler SHell
Basically, whenever you call the mxmlc compiler it has to start up the fatty Java Virtual Machine and that ain't good news. Specially in Linux where I find every single Java application damn slow.
To speed things up fcsh starts the JVM only once
per session and keeps it running as long as fcsh is opened. And on top of that it does incremental compilation which means it only compiles the classes that have changed between calls.
So, want to use it? Easy peasy, fsch binary is in the same folder as mxmlc, so fire up your console, browse to the folder (if you don't have it in your path) and type this:
Now you should see in your console something like this.
[code lang="bash"]Adobe Flex Compiler SHell (fcsh)
Version 3.0.0 build 477
Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.
Cool, you have a fcsh session opened. To start the magic type the same as if you were calling mxmlc compiler. As an example this is the call I make to compile HippoHX's GUI:
[code lang="bash"](fcsh) mxmlc tools\gui\com\hippohx\gui\HippoGUI.mxml -source-path+=client\as3 -source-path+=tools\gui -defaults-css-files tools\gui\com\hippohx\gui\hippogui.css[/code]
Hit enter and you'll see something like "Assigned 1 as the compile target id". You've probably noticed that there was no speed improvement. Don't panic, the performance boost comes from now onwards. To compile again, just type this:
[code lang="bash"]compile 1[/code]
Now there's the speed improvement. If you are an obsessive compulsive compiler as I am, this is going to save you tons of time.
I wish the compiler was fast by default and I'd like to know Adobe's reasons to build the compiler in Java instead of plain C, but until that time comes, we have fcsh. If you want to know more about it, read it from the man behind the idea