On Thu, 18 Sep 2008, Kevin Jackson <[EMAIL PROTECTED]> wrote:

>> The tests are not through yet, but one thing was so surprising to
>> me that I wanted to show it upfront:
>>
>> Running the matchall target (of sr/etc/performance/dirscanner.xml):
>>
>> Ant 1.6.5               1 min 30 s      ~ 19 MB
>> Ant 1.7.0               3 min 53 s      ~ 24 MB
>> Ant 1.7.1                     10 s      ~ 14 MB
>>
>> So 1.7.0 took more than twice as long as 1.6.5 to find all files in
>> a big directory tree without any patterns and 1.7.1 is a whole lot
>> faster than even 1.6.5.
> 
> That's a huge difference - what are we doing now in 1.7.1 that is
> different from before?

Apart from the I/O syscall reducing change there is another major
change in Union (svn rev 581394) which is similar in effect to my
VectorSet change in trunk's HEAD - avoid the linear time complexity of
List.contains().

If I change the scan macrodef in dirscanner.xml to read

  <macrodef name="scan">
    <attribute name="test"/>
    <element name="patterns" optional="true"/>
    <sequential>
      <pathconvert property="@{test}">
          <fileset dir="${test.dir}" followSymlinks="${symlinks}"
                   casesensitive="${casesensitive}">
            <patterns/>
          </fileset>
      </pathconvert>
    </sequential>
  </macrodef>

i.e. remove the <path> around <fileset> that was only there to allow
it to work in 1.6.5, then I avoid Union's code and the results become

Ant 1.7.0                     45 s      ~ 18 MB
Ant 1.7.1                      9 s      ~ 18 MB
svn rev 696674                 4 s      ~ 41 MB

for the matchall target (same setup as for the quoted results).

So directory scanning performance itself hasn't degraded as much from
1.6.5 to 1.7.0 (it may even have become faster) but evaluating a
<fileset> inside a <path> has.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to