rm: don't preprocess a directory on a file system of type tmpfs or nfs
commitab02e256e957a0b0b17cc00b39415862753629bd
authorJim Meyering <meyering@redhat.com>
Wed, 1 Oct 2008 06:46:46 +0000 (1 08:46 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 1 Oct 2008 07:00:52 +0000 (1 09:00 +0200)
treed442c0ed7d86eaec11cc3c17b7700280be91b743
parent0eff09dfcf744c64cd24dc15784457c9323423fa
rm: don't preprocess a directory on a file system of type tmpfs or nfs

The preprocessing phase is not necessary on tmpfs, and induces
a 20% performance decrease when removing a 2M-entry directory.
* src/remove.c (fs_handles_readdir_ordered_dirents_efficiently):
(dirent_inode_sort_may_be_useful): New functions from gnulib/fts.c.
They'll probably become a gnulib module -- eventually.
(preprocess_dir): Use dirent_inode_sort_may_be_useful.
src/remove.c