ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <medi...@mtolive.com>
Subject DirectoryScanner Optimization Question
Date Wed, 13 Sep 2000 21:02:37 GMT
I've been wondering if using a Hashtable instead of a Vector to hold
excluded directories would provide faster lookups. The applicable code is:

    private boolean isExcluded(String name) {
        for (int i = 0; i < excludes.length; i++) {
            if (matchPath(excludes[i],name)) {
                return true;
            }
        }
        return false;
    }

Couldn't the paths of the excluded files be parsed ahead of time to avoid
the need to repeated invoke the matchPath method?



Mime
View raw message