Any advice for speeding up the compile time in Flex Builder 3?

后端 未结 14 764
粉色の甜心
粉色の甜心 2020-12-25 08:10

I run Flex Builder 3 on a mac and as my project grows - the compile time gets longer and longer and longer. I am using some SWC\'s and there is a fair amount of code but it

14条回答
  •  天命终不由人
    2020-12-25 08:38

    First of all, comments on some of the response:

    1. There is no need to explicitly specify -incremental in Flex Builder because it uses incremental compilation by default.

    2. -keep-generated-actionscript is a performance killer because it instructs the compiler to write out AS3 codes generated for MXML components in the middle of the compilation. File I/O in the middle of a compilation means unnecessary pauses and low CPU utilizations.

    3. -optimize slows down linking because it instructs the linker to produce smaller SWFs. Note that -optimize=true|false doesn't have any effect on building SWCs because SWCs are libraries and have to be unoptimized.

    4. I rarely mess with JVM settings because JVM knows its jobs well and tunes itself quite well at runtime. Most people make matter worse by setting various GC tuning parameters. That said, there are 3 settings most people understand and set correctly for their usage:

    -Xmx (max heap size)

    -server or -client (HotSpot Server or Client VM)

    -XX:+UseSerialGC or -XX:+UseParallelGC (or other non-serial GC)

    -server consistently outperforms -client by about 30% when running the Flex compiler. -XX:+UseParallelGC turns on the parallel garbage collector. ideal for multicore computer and when the computer still has CPU cycles to spare.

    You may also want to check out HellFire Compiler Daemon (http://bytecode-workshop.com/). It uses multiple processor cores to compile multiple Flex applications at the same time. You can also run the compiler on a second machine via sockets (assuming that your second machine has faster CPUs and more memory).

    In my opinion, use more modules than libraries and use HFCD.

    Hope this helps.

    -Clement

提交回复
热议问题