Analyzing Ant Build Performance Your project has Ant build scripts. It's running in a Continuous Integration environment. But as your project evolves the build gets slower and slower, and before long you're waiting more than 20 minutes for a build to complete. What now? Enter Antutility. Antutility is a non-intrusive tool for analyzing Ant build script performance and behavior. Without modifying your build scripts, you can find out exactly what part of your build is causing the problem. To analyze your build, execute your build as follows:
$ export CLASSPATH=/path/to/antutility.jar
$ ant -listener	net.java.antutility.BuildMetricsListener [target]
	
While the build is running Antutility will collect metrics and display a report when the build is complete:
BUILD METRICS:
Local Time, Child Time, Invocation Count, Type, Name, Location
76515, 0, 111, TASK, eclipse-plugin-dependency-classpath, build/ant/eclipse-plugin-build.xml:51: 
47919, 0, 102, TASK, javac, build/ant/eclipse-plugin-build.xml:105: 
37024, 0, 6, TASK, java, build/ant/eclipse-plugin-build.xml:234: 
34707, 0, 1, TASK, untar, com.maketechnologies.tlm.test.common/test.xml:50: 
32094, 0, 1, TASK, gunzip, com.maketechnologies.tlm.test.common/test.xml:49: 
16656, 0, 7, TASK, junit, build/ant/eclipse-plugin-build.xml:290: 
13383, 0, 1, TASK, copy, build/ant/eclipse-site-build.xml:45: 
9335, 0, 1, TASK, java, com.maketechnologies.tlm.test.common/test.xml:113: 
... snip ...	
	
The report will let you know which tasks take the most time, how often they are called, and where in your build scripts the tasks are declared. Now you can pinpoint the problem, modify the build and you're back in the game! For more details on how to improve your Ant build, see the Antutility project page.