views:

180

answers:

6

Currently, as I'm sure most of you are aware, the Flex (EDIT: Flex 3) compiler is extraordinarily slow. It does however have an API. My question is: are there alternative (possibly C/C++ based) compilers that are faster than the current Adobe one?

I realize compilers aren't something you can pump out in a few days, but if no alternative is available, do you think it would be worth the time to implement a faster flex compiler?

+1  A: 

I suspect that it would be worthwhile for someone to implement a complete alternative compiler and dev infrastructure (Flex Builder isn't that strong to begin with). Having said that, I know of know such project for the AS3 language.

If you are willing to go to a language that is only marginally different (and from the looks of it, just plain better), then I'd suggest taking a look at haXe. From what I understand, the haXe compiler is quite a bit faster than the Flex compiler.

jsight
The trouble is we already have a huge code base written. Even if the language is similar, I don't think it would be worth it to migrate the entire thing. Ideally I'd like something to take in straight flex code.
Alex Beardsley
Yes, I agree that haXe isn't practical in many (most) situations. Its just the only alternative that I've found (and I've done a bit of searching as well). Hopefully they'll improve things with Flex 4.
jsight
+2  A: 

The compiler is supposed to be much faster in Flex 4. But I haven't verified this with actual real-world use cases yet. If you try it then let me know what you find.

James Ward
A: 

There is a nice plugin for Aptana to develop Air applications

Franky
A: 

I did some asking around and someone else told me about this:

http://www.deitte.com/archives/2008/10/a%5Ffaster%5Fflex%5F3.htm

This is related to what @James Ward said, that the flex 4 compiler is supposed to be faster. This guy back-ported some of the changes from the flex 4 to the flex 3.0/3.1/3.2 sdks and claims a 25% increase in speed.

I've never tried it; the person I talked to said he had and it was giving him some problems, but it could have been something he was doing wrong.

If someone uses this, please do post your experiences with it.

Alex Beardsley
Not sure why someone downvoted this =/
Alex Beardsley
+1  A: 

You may want to have a look at the HFCD which analyzes your project structure and spawns multiple compiler tasks in parallel.

This however does only change the performance if your project consists of multiple small modules. An Eclipse plug-in for HFCD exists as well.

Joa Ebert
+1  A: 

You should definitely check out HFCD (http://bytecode-workshop.com/). It supports both Flex 3 and 4. It's faster than Flex 3 and 4 because it allows for compiling multiple applications at the same time on a multi-core computer. HFCD is also TCP/IP enabled. That means you can run the HFCD compiler on a second machine (possibly with more CPU and memory).

Clement