3

One of the most annoying things when working with Flash/Flex projects is that it takes soo long to build the project. In a Flash game I am doing, it takes more than one minute to build it...

So, the question is simple: Is that normal? Am I doing something wrong? Is there a way to minimize this?

miguelSantirso
  • 1,243
  • 1
  • 12
  • 26
  • I believe FDT supports incremental building process while Flash Builder doesn't. At least it was like that some "years" ago; don't know if that has changed. – poke Nov 22 '10 at 11:47
  • @Poke Adobe makes the compiler, and the compiler has an argument to support incremental builds. Without that compiler argument, FDT wouldn't be able to offer that feature. To suggest it was implemented in FDT, which relies o the Adobe compiler, but has no support in Flash Builder is ridiculous. Flash Builder does indeed have support for incremental builds. – JeffryHouser Nov 22 '10 at 14:12

4 Answers4

7

A common way of avoiding the long build-times is to divide your project up into multiple projects and reference them in as SWC's in a Main project.

Actually the shorter build times are mostly considered a positive side effect, as any larger project really ought to be divided into multiple project. Typically you will have more than one library project, handling the service layer/ controller ect.

This way you could for move the controller/ game logic to one project. This would have longer intervals between changes, and therefore you could close this project, building only the one you are currently working in.

If you are using a lot of assets from Flash ect. move those to a SWC as well.

NielsBjerg
  • 701
  • 4
  • 9
  • While this is true (and actually it is the way I adopt myself), note that there is a drawback: changing even a single class in a library project cause its swf to be rebuilt and other projects depending on it to be "fully" rebuilt.. so, it can break incremental compilation in this scenario, as MXMLC and Flash Builder are not (yet) smart enough to support cross-project incremental build. The ASC 2.0 shipped with Flash Builder 4.7, in theory, supports this but its usage is limited to pure AS3 non-Flex projects, and I'm not even sure that FB is actually using this advanced compiler feature. – Cosma Colanicchia Feb 19 '13 at 08:16
5

A simple tip that makes compile time from the Flash IDE a bit shorter: Go to 'publish settings' > actionscript 3.0 > settings > disable 'Warnings Mode'

This mode checks if you are using actionscript 2.0 functions. If you know what you are doing (not copy/paste as2.0 code into as3.0 projects), you'll never need these 'warnings'.

Another tip is to use lots of SWC's: if you are using a tweenengine or a framework; most of them are available as SWC files. Use them.

Mark Knol
  • 9,663
  • 3
  • 29
  • 44
  • 2
    THANK YOU. Switching off 'Warnings Mode' cut my compile time from 45 seconds down to 5 seconds, so my compile time is now 1/9 what it was. I thought refactoring classes into a separate SWC and referencing it would cut my compile times, but it seems to have increased them a bit. Turning off warnings mode saves me a lot of time. – Triynko Feb 14 '11 at 19:19
1

Yes, it is normal. it can take more if your projects get bigger and bigger. I have a flex project that a full build (using ANT not flex builder) takes 4 minutes.

The best advice I can give you on the subject and is an SSD drive, an SSD drive installed on my Mac cut the times by more then 50%.

KensoDev
  • 3,285
  • 21
  • 38
1

I've found embedding assets tends to delay build times considerably. It's hardly noticeable at first but after a while they start stacking up and build time increases.

Maybe try delaying embedding assets a long as you can.

Ben
  • 20,737
  • 12
  • 71
  • 115