Marty Andrews

artful code

Thursday, June 22, 2006

ant build speed with ivy

I work on a project with a *big* build. It has over 100 inter-dependant components, each with their own Ant build file. Developers need to build them all on their local machines as part of their normal build process. I won't go into why its like that for now. Needless to say, I think its way to big and would love to get the opportunity to simplify it.

We use Ivy to manage the build and make sure everything gets built in an order that satisfies the dependencies. Up until a week ago, a full build took about 45 minutes. Then I happened to stumble across a thread on the ant-user mailing list discussing performance of various ant tasks. It basically says that using the subant task or the antcall task is expensive, because it constructs a new ant project under the covers. Using subant is the way Ivy calls all of the sub-builds, so we had some usage of it in our main build.

I re-factored our build to minimise the use of subant, and also cleaned up a few antcall's that we had. Our build went down from 45 minutes to 35 minutes. Thats an enormous gain for the project when you have over 30 developers running it every day.

No comments:

Post a Comment