bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] find: take advantage of new gnulib/fts leaf-optimization


From: James Youngman
Subject: Re: [PATCH 3/3] find: take advantage of new gnulib/fts leaf-optimization
Date: Sun, 4 Jan 2009 00:31:40 +0000

On Sun, Jan 4, 2009 at 12:09 AM, Eric Blake <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to James Youngman on 1/3/2009 3:04 PM:
>> 2. There exist other filesystems where (st_links - (0 or 2)) <
>> (subdirectory count).   The only example I can think of offhand is
>> AFS.   There is some incomplete information at
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143111
>
> On cygwin 1.5, remote drives have st_links == 1; and on the upcoming
> cygwin 1.7, all directories have st_links == 1.

This is obviously not a problem case, though.   st_links<2 can be used
as a hint that the leaf optimization cannot work.  Indeed, that's just
how oldfind uses it.

> This is because the cost
> of computing how many subdirectories are within a directory outweighs the
> optimization that can be gained by knowing when all subdirectories have
> been encountered.  At least cygwin 1.7 also adds d_link, so that at least
> optimizations using readdir are possible.
>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             address@hidden
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAklf/jIACgkQ84KuGfSFAYCXGACgmXhqwuLjlMgL/Ku7CAVaFp0S
> Im4An18MW89+LSIhGuMnwC42EsCzJ9o0
> =y6EG
> -----END PGP SIGNATURE-----
>




reply via email to

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