bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?


From: James Youngman
Subject: Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?
Date: Fri, 28 Nov 2008 10:07:06 +0000

On Thu, Nov 27, 2008 at 10:53 PM, Eric Blake <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [dropping cygwin-patches, since posts are closed to non-subscribers, and
> adding bug-findutils and bug-gnulib.  Christian is working on a patch that
> lets cygwin do initial support of dirent.d_type]
>
> According to Christian Franke on 11/27/2008 2:41 PM:
>>
>> PS: find is not as smart as expected: 'find /path -type d' calls lstat()
>> for each entry, even if d_type != DT_UNKNOWN.
>> So 'find /path' is 2-3 times faster than 'find /path -type d'.
>
> This seems like it might be a bug in gnulib's fts implementation.  How
> does 'oldfind /path -type d' perform?  oldfind has the advantage of not
> using fts, so if it performs better, then there is a hole where we need to
> improve gnulib's fts to make directory-only or non-directory-only
> traversals use d_type for optimization.

I believe that at least a large part of the problem may be the fact
that some files are stat()ed by both fts (as part of the traversal
logic) and find.  However, this hasn't been fully investigated.

If someone would be able to investigate and discover the places where
duplicate *stat() calls are made, this would allow us to close the
performance gap between oldfind and find.   That and the performance
gap between find and oldfind with "-execdir ...+" are IIRC the only
reasons why we still build oldfind at all.

So if someone would be able to investigate, I'd be very grateful.

James.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]