]>
Savannah Git Hosting - gnulib.git/commit
fts: enable leaf optimization for XFS
XFS provides usable dirent.d_type only for DT_DIR,
but the noleaf optimization still applies, as confirmed with:
test $(($(find . -maxdepth 1 -type d | wc -l) + 1)) = $(stat -c %h .)
Enabling this gives significant traversal speedup.
Testing with find(1) gives:
$ time find/find-before /usr/share >/dev/null
real 0m0.410s
user 0m0.145s
sys 0m0.266s
$ time find/find-after /usr/share >/dev/null
real 0m0.278s
user 0m0.147s
sys 0m0.131s
* lib/fts.c (leaf_optimization_applies): Add XFS to the white list.