emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does not rgrep use "grep -r"?


From: Eli Zaretskii
Subject: Re: Why does not rgrep use "grep -r"?
Date: Sat, 03 Nov 2007 10:40:02 +0200

> From: Miles Bader <address@hidden>
> Date: Sat, 03 Nov 2007 12:37:47 +0900
> Cc: Andreas Schwab <address@hidden>, Emacs Devel <address@hidden>
> 
> > I believed that grep had to be started many times. Is not that the case?
> 
> xargs invokes grep in "batches," with as many filenames as will fit on
> the command line; for e.g. linux, that's many thousands at once, so
> process invocation overhead will tend to be in the noise compared to
> file I/O overhead.

Yes, but I believe "grep -r" will be still faster, even on GNU/Linux,
since all it does to recurse is `readdir' and `fnmatch'; the need for
writing file names to the pipe and reading them on the xargs side is
avoided.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]