Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tips for speeding up build time on Linux using ANT, Javacc, JUnit and compiling Java classes

We have a large codebase that takes approx 12 minutes on the developer machines to auto-generate some Java 5 classes using JavaCC and then compiles all the classes as well as running the units test.

The project consists of multiple projects which can be built in groups, but we are aiming for a full a build in under 10 minutes

What tips are there for reducing this build time?

Thanks

like image 933
Craig Angus Avatar asked Sep 28 '08 22:09

Craig Angus


2 Answers

One quick fix that might shave some time off is to ensure that you are running Ant using the server JVM (by default it uses the client VM). Set ANT_OPTS to include "-server".

like image 180
Dan Dyer Avatar answered Oct 13 '22 21:10

Dan Dyer


  • Profile the build process and see where the bottlenecks are. This can give you some ideas as to how to improve the process.
  • Try building independent projects in parallel on multi-core/CPU machines. As an extension of this idea, you may want to look around for a Java equivalent of distcc (don't know whether it exists) to distribute your build over a number of machines.
  • Get better machines.
like image 34
Alexander Avatar answered Oct 13 '22 19:10

Alexander