ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34194] New: - ZipScanner needlessly scans files under "basedir" needlessly when scanning zips.
Date Sun, 27 Mar 2005 00:54:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34194>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34194

           Summary: ZipScanner needlessly scans files under "basedir"
                    needlessly when scanning zips.
           Product: Ant
           Version: 1.6.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: yonas.jongkind@gmail.com


We have project with a large number of data files.  When we are reading from a
zipfile using ziptask it was taking 5 minutes to scan for the files.

Eventually I tracked it down.  ZipScanner extends DirectoryScanner.  ZipScanner
overrides getIncludedFiles and getIncludedDirectories so it works perfectly.

But it does not override scan().  So this get's passed to DirectoryScanner who
does a complete scan (even though it is impossible to get these results).

So this is needless slowing down everyones ant builds.

I fixed mine by adding:

    public void scan() throws IllegalStateException {
        if (srcFile != null) {
            //super.scan();
            scanme();
        } else {
            super.scan();
        }
    }

To ZipScanner.

My operating platform is sun, though this probably affects everything.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message