ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Meakin" <geo...@isocra.com>
Subject RE: Questions about <foreach> task and properties and memory
Date Thu, 19 Sep 2002 14:16:14 GMT
1. Is this memory usage normal, or is it a bug in <foreach> ?

The difficulty is foreach uses an implicit {antcall} mechanism (e.g.
the <antcall task> Now many people claim that this doesnt have memory
leaks unless the called tasks have <javac> in them (which has known
memory leaks), however, I think it does, as I have a buildscript which
runs out of memory very quickly using <foreach> or <antcall>. 
Memory problems with these 2 tasks are a known issue and have been
discussed relatively frequently in the Ant user list recently.
(Aside: Indeed that's actually the prime reason why I started foreach2, 
cos I needed it to work without memory problems)

2. Should Ant not be used in this way ?

It can be. Whether it should be isnt really defined I think. 

3. Instead of defining my properties outside a target, should i put them in
the "init" target, and only pass the necessary info as params to "foreach"
(maybe this will use less memory) ?

yes, but you'll still have the same problem. You might use slightly less
memory, but this wont make a difference because something is seriously
leaking somewhere.

4. Are you still reading ;) ?

:)

Cheers
-Geoff


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message