This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: findutils support in 1.7.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]