From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71094: [PATCH] Prefer to run find and grep in parallel in rgrep Date: Thu, 23 May 2024 16:24:11 +0300 Message-ID: <149bf36e-831a-47ac-a424-7a3008462561@gutov.dev> References: <86ttiq6or8.fsf@gnu.org> <8aedd0ed-58fe-4ac7-98d6-950be2d4700b@gutov.dev> <868r026jlq.fsf@gnu.org> <861q5t7vrp.fsf@gnu.org> <10f62497-dfb1-4c46-b18a-6d1100de4b6a@gutov.dev> <86wmnl6f62.fsf@gnu.org> <87pltdbu17.fsf@ledu-giraud.fr> <86r0dt66nw.fsf@gnu.org> <87le41bqvd.fsf@ledu-giraud.fr> <86o78x5e5n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: sbaugh@janestreet.com, 71094@debbugs.gnu.org, rgm@gnu.org To: Eli Zaretskii , Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 23 15:25:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sA8RX-0004nS-U3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 May 2024 15:25:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sA8RH-0003Cj-Eg; Thu, 23 May 2024 09:24:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA8RF-00039V-2r for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 09:24:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sA8RE-00018T-GM for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 09:24:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sA8RK-0002dC-KE for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 09:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 May 2024 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71094 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71094-submit@debbugs.gnu.org id=B71094.171647067310079 (code B ref 71094); Thu, 23 May 2024 13:25:02 +0000 Original-Received: (at 71094) by debbugs.gnu.org; 23 May 2024 13:24:33 +0000 Original-Received: from localhost ([127.0.0.1]:59060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA8Qq-0002cV-JZ for submit@debbugs.gnu.org; Thu, 23 May 2024 09:24:32 -0400 Original-Received: from fout7-smtp.messagingengine.com ([103.168.172.150]:39531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA8Ql-0002cN-A3 for 71094@debbugs.gnu.org; Thu, 23 May 2024 09:24:30 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 725EA13803AA; Thu, 23 May 2024 09:24:15 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 23 May 2024 09:24:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1716470655; x=1716557055; bh=dZPrJ80ij9yBP++9vieifQU0SdXUcQsZpXEzLQPXfHM=; b= FxmY6dfYaEhqYQv5aBMREY46WhMeTBloYqGhE7V9HNhRaK12IdVHMwUi9udGtfXJ dMaSfgQORneHw9OOUiHEmhGXZ1ms5zJG8djrw2u1bO3TA1jcWPOQynUuYA2bKl4y ydmic4yK7c66tBy0NAKmY2bz6Rcb3KyEbXW2k2ZDsGomaLgMdwGOfvy9Z4/Uaseg Xs668XBuWaS+vlPIYHO3F8NPFrUjhL9E3urgzV6WI7oIehZDLF7Iau/hB+JYuxFo EfDm8a/x4h+BAC210KmXuT9Q0KjajtftrE4sDsgu1saN2J7JNfQESt4JQS+pI1/f 7FVniLUixbJb0CETpswBkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716470655; x= 1716557055; bh=dZPrJ80ij9yBP++9vieifQU0SdXUcQsZpXEzLQPXfHM=; b=j Hm9RqKITRK4lFq1EfHOHmxXQf+vpn3c4RM4SAFo0121h+zhrzRHiBTGNwG7YXAcS uslmGjmZP1BL0yZB/Yo1zz+E5APyuZjFzkgx6z0VbtdbCZ3rwoIMqYhEB3/zfLes DsSxWCc4vBAZhlpNI1WA5vl2O4tesMdGdPO0ktZiiEtCAEzBRhwpXFIVaLzLTVeL PYK/sajkuF+KBflWkX7MQ8Om9ToOvnXE5zL8ZZmLK0qXKpHL3Y0+hBOZ34KYH4uv 0y2cVPUG4izrey8PqF4eMehZkhY0wYQRBefdnv6nke75f1B2PyNT0+4YJzjw9aP/ gASDnYVZXmLlkXV6YFnVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeiiedgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 May 2024 09:24:13 -0400 (EDT) Content-Language: en-US In-Reply-To: <86o78x5e5n.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285704 Archived-At: On 23/05/2024 07:46, Eli Zaretskii wrote: >> From: Manuel Giraud >> Cc:dmitry@gutov.dev,sbaugh@janestreet.com,71094@debbugs.gnu.org, >> rgm@gnu.org >> Date: Wed, 22 May 2024 21:15:02 +0200 >> >> Eli Zaretskii writes: >> >> [...] >> >>> Thanks, but we need the timings of the corresponding Emacs commands, >>> not the commands run from the shell prompt. >> Ok. What are those commands and how to timed them? > It's rgrep, AFAIU, according to the original report in this bug's > discussion. Dmitry, would you please show Manual the commands you > were running in your benchmarks? 1. Visit a directory with a fair number of files. 2. M-x rgrep, enter some odd regexp like "asdfasf@!#!" and "*" for the files wildcard. 3. Perform the search. Look at the end of the *grep* output, it will say something like "duration: 4.52 s". Note the number. And you could repeat the same after applying the patch, recompiling Emacs (or at least grep.el) and restarting. Preferably do the scenario 2-3 times to ensure that the filesystem cache is warm, and cold file access speed doesn't skew the numbers.