Hi, On Sun, Sep 13, 2009 at 10:05:04PM +0300, Sergiu Ivanov wrote: > On Wed, Sep 09, 2009 at 11:55:48AM +0200, Carl Fredrik Hammar wrote:
> > However, both this and my proposal (which you really intended), is > > just as efficient as the original implementation. Matching PATTERN > > under all directories in stow, is equivalent to matching `*/PATTERN' > > in these implementations. All proposed implementations would > > iterate the same number of directories, and filter the same number > > of paths. > > This would be true, if the original pattern-matching feature > implementation could correctly interpret multi-component patterns. > However, AIUI from the source code, the existing version simply > iterates all sub-directories of stow/*/ and tries to match their names > against the pattern. I compared the implementation that could deal > with multi-component patterns with the original implementation of the > pattern-matching feature and came to the conclusion multi-component > pattern support would require more effort. I still don't understand why you think that the current hardcoded "descend into all directories, then match all subdirectories against foo" is more efficient than "descend into all directories matching * (i.e. all directories), then match all subdirectories against foo"?... -antrik-