On 3 Dec 2004, <[EMAIL PROTECTED]> wrote:
> Try to speed up DirectoryScanner by using hash lookups instead of
> linear searches and pattern matching on non-wildcard patterns.
I threatened to do it. I'll watch the next Gump run closely, both for
breaking builds as well as performance impact. I don't think things
have gotten much worse in cases where all patterns contain wildcards,
but it really should improve things if no wildcards are there at all.
> - if ((myfile == null || !myfile.exists()) && !isCaseSensitive) {
> + if ((myfile == null || !myfile.exists()) &&
> !isCaseSensitive()) {
I also changed these in a few places since isCaseSensitive() is
non-final and protected. If subclasses override this method, it
should have some effect IMHO.
> + * Set of all include patterns that are full file names and don't
> + * contain any wildcards.
> + *
> + * <p>Gets lazily initialized on the first invocation of
> + * isIncluded or isExcluded and cleared at the end of the scan
> + * method (cleared in clearCaches, actually).</p>
My first attempt initialized them in scan(), but that doesn't mix with
subclasses like ZipScanner that invoke isIncluded and isExcluded but
never invoke scan at all.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]