ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: OutOfMemory errors
Date Tue, 10 Sep 2002 19:18:00 GMT
<subant> would help a little I think, but I'm not sure it would solve the
problem...

It would help because it avoid the <antcall> overhead of <foreach>.

It wouldn't help that much I fear because it still calls <ant> (or the
<foreach> solution does I'm sure, in the supplied target) as many times as
required to build all the sub-projects.

I suspect the leaks are coming from both <ant> and <antcall> (and other
tasks most likely), so going from an <antcall>/<ant> per sub-project to just
an <ant> might not be enough to solve this particular issue. It might still
help enough for making a 1.0 release though ;-)

Also, to lighten up the memory usage of the sub-builds themselves, they
should fork whenever possible, especially for memory hungry tasks like
<javac>. Forking guarantees the memory is freed, since the process exits!

<subant> could be made to fork relatively easily, but then you would loose
the references and the listeners/loggers connections (properties could be
passed down by saving them to a properties file, and adding the right
command line options to the sub-build). That would involve not using <ant>
anymore, but basically <exec>'ing a new Ant for the sub-build, again
guaranteeing memory is freed upon the sub-build process exiting.

I'm not sure whether that help you guys. Sorry, --DD

-----Original Message-----
From: Steve Loughran [mailto:steve_l@iseran.com] 
Sent: Tuesday, September 10, 2002 2:06 PM
To: Ant Developers List; axis-dev
Subject: Re: OutOfMemory errors

I think the problem may be in <foreach>, which creates a new <antcall>
instance for each element, using Project.create(), which of course calls
Project.addCreatedTask(). So the project caches all tasks, all subtasks,
etc.

...DD - does subant have the same problem?

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


Mime
View raw message