ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bevan Arps <bevan.a...@actfs.co.nz>
Subject How to Reduce ANT memory use
Date Sat, 21 Apr 2001 00:09:46 GMT

This seems to be a question that pops up reasonably regularly - I even
asked it myself a few weeks ago.

I have found that the size/complexity of your build.xml file has a
disproportionately large impact on the amount of memory used by Ant.



In my situation, I had the following:

-- A single Build.xml file (93K in size) with details for five different
builds
-- Each build compiled multiple applications (Java, Delphi)

Doing an "APPparts" build was requiring the JVM to take over 250M just
for Ant - other process running on the maching took another 50M of
memory.

Since this was running on a Win NT 4.0 sp 5 machine with 128M of real
memory, the builds crawled - taking 52minutes to build 13 Delphi
applications.



I changed the configuration to the following

-- A separate Build.xml file for each of the five different builds

Doing an "APPparts" build now only requires around 100M of memory for
the JVM, saving 150M. The builds now run in less than 5 minutes - over
10x faster.

Note that the steps taken by Ant in doing the "APPparts" build were
unchanged - the separate Build.xml files were created by removing
targets not used for the required build.


Hope this helps someone,
Bevan.

PS: Should Ant behave like this - or have I uncovered some kind of bug? 
If this *is* a bug, I can try to trace it and find a solution.


-- 
_______________________________________________________________________
Bevan Arps, OO Analyst                    email: bevan.arps@actfs.co.nz
ACT Financial Systems     "Programming is an Art Form that Fights Back"
***********************************************************************
This  communication  is confidential  to ACT  Financial  Systems  (Asia
Pacific)  and is intended for  use only by the  addressee.   The  views
and opinions  expressed in  this email  are the senders  own and do not
represent  the  views  and  opinions of  ACT  Financial  Systems  (Asia
Pacific).
***********************************************************************

Mime
View raw message