2008/9/5 Stefan Bodewig <[EMAIL PROTECTED]>: > On Thu, 4 Sep 2008, Peter Reilly <[EMAIL PROTECTED]> wrote: > >> Is it not costly (as in very costly) to get the canonical path ? > > That's what I've been told but I've never measured it. > > Currently DirectoryScanner avoids looking at the canonical path unless > followSymlinks is false. The problem with infinite loops caused by > symlinks only happens if followSymlinks is true - so any solution to > the problem will make DirectoryScanner look up canonical paths more > often and thus probably make scanning slower. >
Instead of checking the canonical path, we could maybe check to path in which we want to recurse. The only case where we need to check for symlink is when we are in A/base and want to recurse in a directory name A. I'm not 100% sure that checking all part of the current directory against the new sub directory would be much fatser, but it might be an optimizing option. Anyway, this kind of check should not be done on windows, and should only be done if the new directory is matching within the ** part of a pattern. An other alternative might be to just add a depth counter, and when it reach a resonably value, launch a procedure that check if this deep path contains a recusion. If it does, we can just fail the build, asking to fix the fileset declaration. If it doesn't, we increase the max depth, and continue That way the overhead is minimal and we keep backward compatibility. -- Gilles Scokart --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]