-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [adding bug-gnulib, as this is an fts issue]
According to George Spelvin on 9/20/2008 3:36 PM: > Looking for an inode that fsck complained about, I did a find, > and noticed that it was statting every file name it found. > > Hunting through the code, I see that, in tree.c, pred_inum is marked > NeedsStatInfo. Is there a reason that struct dirent's d_ino field > can't be used instead? That would drastically reduce the cost of this > predicate. > > (This would also benefit pred_samefile.) This only works for systems where d_ino is reliable. Even recent GNU/Linux systems have been known to mis-report d_ino in the presence of mount points; coreutils' 'ls -i' is still turning up issues ever since it switched to using d_ino a couple years ago. But yes, it would be nice if gnulib's fts could optimize traversals that only need inode information. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----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 iEYEARECAAYFAkjWmiEACgkQ84KuGfSFAYDFYACfXyxfLQ+gDR5H7yuUcUveo7aW 9GAAnj4GPsLFhJ3JoOrUXRWoXUQeyrxj =fxsN -----END PGP SIGNATURE-----