ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Solofnenko" <trel...@gmail.com>
Subject Re: 1.7 Memory usage > 1.6.5 Memory usage
Date Wed, 19 Apr 2006 06:42:51 GMT
The change you mentioned would only affect performance, not memory usage.
Have you tried to run ANT in any profiler to see where most of the memory is
allocated?

- Alexey.

On 4/18/06, Kev Jackson <kevin.jackson@it.fts-vn.com> wrote:
>
> Just trying to reduce the amount of temporary objects created on the
> heap to resolve this OutOfMemory issue with AppFuse, and with the 1.6.5
> source, I can reduce memory consumption by putting a guard around when
> Strings are created for logging eg:
>
> log("Copying "+fromFile+" to "+toFile, verbosity)
>
> becomes
>
> StringBuffer sb = new StringBuffer("Copying ").append(fromFile).append("
> to ");
> ... (code elided)
> //not the same behaviour, but need to try  and see : don't log unless
> user wants debug output
> if (verbosity >= Project.MSG_DEBUG) {
>   log(sb.append(toFile).toString(), verbosity);
> }
>
> This helps as the strings aren't created at all unless the verbosity is
> set to DEBUG, however, in Ant 1.7, even with this change, there is an
> OutOfMemory error.  Basically some of the 1.7 tasks are consuming much
> more memory than the 1.6.5 codebase.
>
> In general though, the logging mechanism is always going to create a lot
> of temporary cruft as it stands, and this is perhaps one area where
> there could be some refactoring?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


--
Alexey N. Solofnenko trelony at gmail.com
home: http://trelony.cjb.net/
Pleasant Hill, CA (GMT-8 hours usually)
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message