https://bz.apache.org/bugzilla/show_bug.cgi?id=66048
Bug ID: 66048
Summary: Directory Scanner extremely slow
Product: Ant
Version: 1.10.12
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Directory scans in '/slowdir' have been super slow. '/slowdir' is a small
directory on my workstation’s flash drive. This directory does contain some
symbolic links to large directories on the large external disk drives, so it
does appear to be traversing down the directory tree. Every time I run it, my
large external drives are thrashing. That explains why it’s slow.
Analyzed by Adam Retter:
For your example, I recreated and traced the behaviour of what is happening
through the Apache Ant code. As far as I can see it is not actually accessing
every file in every folder recursively. However, what it is doing, which is
unnecessary, is listing the contents of each sub-folder of your /slowdir. That
occurs because of this line of code in Ant, which lists the contents of the
first level of sub-folders to work out if they are directories or not:
https://github.com/apache/ant/blob/rel/1.10.12/src/main/org/apache/tools/ant/DirectoryScanner.java#L1239
IMHO this is not a "bug" per-se in Ant, as the function does what it is meant
to do, however it certainly does more work than it needs to when looking for
patterns in a sub-folder that don't require recursion. I would suggest opening
an issue with the Apache Ant project, and then an eXist-db issue and linking in
that to the Apache Ant issue. If this can get fixed upstream, it would be easy
for us to update to a newer version of Ant to solve this. (edited)
--
You are receiving this mail because:
You are the assignee for the bug.