javamultithreadingmemoryantmxmlc

Ant parallel performance


I need to compile many similar SWFs in my project. I have ant build file, where I run mxmlc (flex compiler) tasks. To decrease general build time I want to run the tasks parallel. I have 4 core cpu.

<parallel threadsperprocessor="1" failonany="true">

If I don't use parallel compilation, then it takes ~12 sec to compile one swf. But when I try to run it parallel (4 cores => 4 threads at a time), the compile time of each swf is ~20 sec and while ant is running I have terrible lags of whole OS. Important: I've just reinstalled my OS (windows 7 64), and before it everything worked fine (no lags, fast 12sec compilation with 4 threads). By the way, if I set threadcount="2", then it is also OK, but I want to do it in 4 threads.

I guess It might be some java memory issues. I'm using now (and used before) -Xmx1024m -Xms256m

Please, help me to configure my JVM to make my build fast.


Solution

  • Ok, I've managed. Installed x86 JRE instead of x64. I have no idea why it didn't work for x64...