|
From: | Lennart Borgman (gmail) |
Subject: | Re: Why does not rgrep use "grep -r"? |
Date: | Sat, 03 Nov 2007 00:56:17 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
Andreas Schwab wrote:
Miles Bader <address@hidden> writes:I don't know the reason of the rgrep authors (though I suspect it was portability concerns), but I have noticed something odd about "grep -r": -- sometimes it seems _much_ slower than "find ... -type f | xargs grep" on very large trees (I think I noticed with trees in NFS, where speed is a perennial issue).Probably because find has been optimized for, umm, finding files. There are quite a few things you can do to speed up directory traversal.
I guess it also depends on what kind of OS you are using, is process creation cheap or not.
[Prev in Thread] | Current Thread | [Next in Thread] |