On 14 Jul 2003, <[EMAIL PROTECTED]> wrote: > Optimize DirectoryScanner to take advantage of include patterns > which are not beginning with wildcards PR: 20103
I'm not sure I understand what you've done, I'll try to come up with some unit tests if I think something is wrong 8-) Some notes: * SelectorUtils#rtrimWildcardTokens should probably short circuit and return the original input if the input doesn't contain any wildcards at all. * the same method may become faster if you'd use tokenizePathAsArray instead of tokenizePath, even though I've never verified any speedup myself. * You go a long way to avoid redundantly adding patterns in DirectoryScanner#checkIncludePatterns (the parent check). If the patterns come in reversed, you'll still have duplicate roots, no? Say a/b/c is added before a/b is. You may avoid this by sorting the include patterns first. * If all patterns are plain files, i.e. no "pattern" contains any wildcards, things could still be improved by not performing any pattern matching at all. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]