ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <>
Subject Why does the <fileset> implementation keep track of filesNotIncluded, dirsNotIncluded?
Date Mon, 05 Oct 2009 17:40:25 GMT
I ran what I thought was a fairly simple Ant target, to
remove unwanted JUnit output from my build tree:

     <target name="cleanTests">
             <fileset dir="${SRCROOT}" includes="**/TEST-*.txt"/>

I found that running this target uses memory proportional
to the size of my entire tree, rather than using memory
proportional to the number of JUnit test output files in my
tree, which is what I expected.

I got a memory dump of my Ant process when it ran out of memory,
and looked inside, and discovered that all the memory was consumed
by the 'filesNotIncluded' and 'dirsNotIncluded' Vector objects
in the DirectoryScanner class.

I don't understand why DirectoryScanner feels the need to track
the files and directories that were *not* included in my fileset.

How would I use such information in my Ant build?

Could this be made optional, so that DirectoryScanner only tracks
this information if I ask it to?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message