[Tfug] When RTFM is not enough

Andre Lehovich tfug@tfug.org
Mon Jul 8 22:13:01 2002


On Mon, 8 Jul 2002, Bowie J. Poag wrote:
>  o You [Brian] tried to dodge the numerous points I made and backed up with
>    real-world stats, and failed.

It would have been more impressive to look at NFS
performance instead of I/O interrupts.  Walking a large
directory tree over NFS is when find really slows down.

> The instant you perform more than one file search, my method will beat
> your [Brian's] method, hands down.

The second find is almost free since the inodes are already
in cache.  Your method only wins on the first search, by
time-shifting the cost of walking the directory tree into
the middle of the night.

If you're trying to find some file anywhere on the system
than locate is dramatically faster than find.  But for small
searches, e.g. ~/ in a typical home directory, the slight
performance hit of using find is often outweighed by the
more accurate listing it provides.

--Andre