findutils support in 1.7.0

Lev Bishop lev.bishop@gmail.com
Mon Apr 28 14:39:00 GMT 2008


On Mon, Apr 28, 2008 at 9:04 AM, Corinna Vinschen wrote:
> On Apr 28 14:13, Corinna Vinschen wrote:
>  > On Apr 26 06:14, Eric Blake wrote:
>
> > >>>   Also, it looks like long path names are currently
>  > >>> quadratic in behavior,
>  > [...]
>
> > As you know, NtQueryAttributesFile is the NT equivalent of
>  > GetFileAttributes.  Maybe this function is slow by design and we're better
>  > off using something along the lines of either
>  >
>  >   NtOpenFile
>  >   NtQueryInformationFile
>  >   NtClose
>  >
>  > or, maybe, something like
>  >
>  >   NtOpenFile(parentdir)
>  >   NtQueryDirectoryFile
>  >   NtClose
>  >
>  > but that's something I will have to test first.  I guess you will be
>  > surprised to read that now, but I'm slightly disappointed at Windows...
>
>  I stick to being disappointed.  None of the above workarounds is any
>  faster.  NT's path handling is obviously only designed for paths of up
>  to MAX_PATH length.

Sorry if this is an irrelevant or trivial comment, but did you try
using the RootDirectory element of ObjectAttributes? Ie, not giving
the whole path to Nt...File(), instead descending the directory tree
one (or a few) steps at a time? Perhaps that would be linear-time?

Lev



More information about the Cygwin-developers mailing list