ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Reilles <Antoine.Reil...@loria.fr>
Subject Re: subant and memory problems
Date Mon, 05 Jun 2006 14:22:40 GMT
Hi,

On Mon, Jun 05, 2006 at 09:05:03AM -0500, Dominique Devienne wrote:
> >I guess the more elegant way would be to add a "fork" attribute to our
> >tom task, but i don't know how difficult it would be, as to is simply a
> >java application.
> 
> That would be the way to go, indeed. It's rather simple to compose the
> Java task in another task. I've used this approach to add "smarts" to
> the Jaxb compiler for example. The code is even in bugzilla I think,
> if you want to have a look. The <tom> task would do all Ant related
> processing, check timestamps and all, and simply generate the
> (possibly long) command line to pass to Java (or Execute) to invoke
> Tom in another VM. --DD
Ok, great ! I just saw the code to the jaxb task. Indeed, it looks quite
easy to use the Java task for that. Thanks a lot for the pointer !
> 
> PS: To investigate whether Tom suffers from the ill as Javac used to,
> you may want to write a pure Java program (no Ant involved) that
> invokes Tom several time in a loop, and see whether memory usage
> increases because memory is not released. Also, check the Tom task
> resets refs to Tom data structures or engine to null. Check Tom
> classes don't have static caches. These kind of things.
I did that, running tom compilation from a java app for fifteen files in
an infinite loop: it ran for 2 days without showing any memory hungry
behavior. There still may be some static containers that would need
cleanup, but even then, i don't think they could eat that much memory,
and don't show in my testcase.

Cheers,
antoine

Mime
View raw message