> From: Matt Benson [mailto:[EMAIL PROTECTED] > --- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote: > > I had thought about this issue of optimizing pattern > > scanning. > > DirectoryScanner used to be written so that if an > > exclude pattern looks like > > foo/bar/** scanning stops in foo/bar. > > Actually if an exclude pattern is like **/Test/**, > > every time a directory Test is encountered it should > > not be scanned. > > The exception to that rule is if some other directory > Test is more explicitly specified as an include; I > think this is handled as well as can be in > couldHoldIncluded().
What do you mean Matt? What you just wrote sounds incorrect to me, and I believe Antoine is correct when he writes that we should stop scanning when *any* Test directory is seen. Excludes always win over includes (or selectors), even if the include is more specific. This is why the selectors are so helpful, because they provide a more flexible mechanism (at the expense of scanning optimizations, since we can't easily guess what to avoid scanning when selectors are involved). --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]