ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45439] New: Memory growth during copy with use of FilterReader
Date Sun, 20 Jul 2008 12:27:10 GMT

           Summary: Memory growth during copy with use of FilterReader
           Product: Ant
           Version: 1.7.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Core tasks

When a <Copy> is performed with the use of <FilterChain>/<FilterReader>,
separate instance of the filter reader is created, under its own classloader,
for every file copied. Every one of these classloaders is registered with the
Project as a BuildListener, and not unregistered until the copy completes. This
leads to potentially huge memory growth during the copy.

I've addressed the situation in my own environment in my FilterReader, with the
following hack:

public int read() {
   ... perform filtering ...

   if (eof_detected) {

It's a risky hack, but doesn't seem to have broken anything.

My project uses Ant 1.6.1, but I have verified the memory growth with 1.7.1.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message