From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Why does not rgrep use "grep -r"? Date: Sat, 3 Nov 2007 00:01:38 -0400 Message-ID: <2E1ECC43-6543-4F6D-A7DA-B3F209F36A88@raeburn.org> References: <472B99AB.3090705@gmail.com> <87ve8k8dyw.fsf@catnip.gol.com> <472BB921.20104@gmail.com> <87d4us6rnl.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194062629 18892 80.91.229.12 (3 Nov 2007 04:03:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Nov 2007 04:03:49 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 03 05:03:51 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IoAEf-00074x-L7 for ged-emacs-devel@m.gmane.org; Sat, 03 Nov 2007 05:03:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IoAEV-0001oC-II for ged-emacs-devel@m.gmane.org; Sat, 03 Nov 2007 00:03:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IoAD9-00089A-CU for emacs-devel@gnu.org; Sat, 03 Nov 2007 00:02:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IoAD8-00087G-Mf for emacs-devel@gnu.org; Sat, 03 Nov 2007 00:02:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IoAD8-00086o-0T for emacs-devel@gnu.org; Sat, 03 Nov 2007 00:02:14 -0400 Original-Received: from alnrmhc11.comcast.net ([204.127.225.91]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IoAD7-00035K-II for emacs-devel@gnu.org; Sat, 03 Nov 2007 00:02:13 -0400 Original-Received: from raeburn.org (c-65-96-188-63.hsd1.ma.comcast.net[65.96.188.63]) by comcast.net (alnrmhc11) with ESMTP id <20071103040152b11002pfoge>; Sat, 3 Nov 2007 04:01:52 +0000 Original-Received: from [69.25.196.101] (laptop.raeburn.org [69.25.196.101]) by raeburn.org (8.14.1/8.12.11) with ESMTP id lA341oPn002152; Sat, 3 Nov 2007 00:01:50 -0400 (EDT) In-Reply-To: <87d4us6rnl.fsf@catnip.gol.com> X-Mailer: Apple Mail (2.752.3) X-detected-kernel: by monty-python.gnu.org: NetCache Data OnTap 5.x X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82403 Archived-At: On Nov 2, 2007, at 21:31, Miles Bader wrote: > "Lennart Borgman (gmail)" writes: >>> 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. > > Neither method should use many processes unless the command-line > arg limit is very short (though on windows, maybe that's the case...). There may also be the issue of parallelism. Even on a single-cpu system, you can queue more i/o requests in advance, or do cpu-bound work with data in memory while the other process is blocked on disk or network i/o. (Now, if "grep -r" uses multiple threads, it may not be an issue...) Ken