From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 16:14:58 2024 Received: (at submit) by debbugs.gnu.org; 24 May 2024 20:14:58 +0000 Received: from localhost ([127.0.0.1]:38970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAbJZ-0006Fb-KA for submit@debbugs.gnu.org; Fri, 24 May 2024 16:14:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:55352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAbJX-0006FV-6G for submit@debbugs.gnu.org; Fri, 24 May 2024 16:14:55 -0400 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 1sAbJL-0007ea-0Q for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 16:14:44 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAbJJ-0007Q7-7a for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 16:14:42 -0400 From: Spencer Baugh To: bug-gnu-emacs@gnu.org Subject: [PATCH] In rgrep, check matching files before excluding files Date: Fri, 24 May 2024 16:14:39 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716581679; bh=DVhkL6dJ4Dbtfxec5y5qqGmlKebTSK6Q4WG4e77H2Xs=; h=From:To:Subject:Date; b=1LjxrXNQ5QU2EptlOFZxW19JazFBO78HhaHAUSR7Wa01TkIlOF0BB08bgHqeWMkYZ Z6Sp0e7ibiuLMBs4EuZA22eL9x1/1j8acKNiFAgbN00v0FCPo7UiaruzjNqg+72Ei6 1m7P+5U+vMElkwxSL13MRmH4+J/IyKt7kAKmcVH9ZV7nvUt8epKvztL3lkvu148O9l mu+P9q4CVawz5AztpAP+dOdL2cPcwFypMSDR5t6G9yS8cfhd52F5iL17j2xbW0oS6e yiMCvmO8l5dx45Y6lsLrRFtQ9D7nxoFVyZgtrLu/nYgvHsYAxLOt7ZnIgnnXnPcGW6 CWm4NOYD6pKCg== Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch In rgrep, check matching files before excluding files There are a lot of excluding globs, and checking them all is expensive. The files glob (i.e. the glob for files we actually want) is usually just one or two entries, so it's quite fast to check. If find checks the files glob first and then the excluding glob, it has to do much less checking (since the files glob will substantially narrow down the set of files on its own), and find performance is much better. In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") from ~410ms to ~130ms. When the files glob is "* .*", there's no benefit from this change, since we still have to check every excluding glob anyway. But there's also no cost. * lisp/progmodes/grep.el (rgrep-default-command): Move the excluded files glob to part of the "files" argument. In GNU Emacs 29.2.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2024-05-20 built on igm-qws-u22796a Repository revision: 734740051bd377d24899d08d00ec8e1bb8e00e00 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Rocky Linux 8.9 (Green Obsidian) Configured using: 'configure -C --with-x-toolkit=lucid --with-gif=ifavailable --with-native-compilation=aot' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-In-rgrep-check-matching-files-before-excluding-files.patch >From f94e7f15c77ff1d8b5736adc49bd1e9bd54c7270 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Fri, 24 May 2024 13:12:28 -0400 Subject: [PATCH] In rgrep, check matching files before excluding files There are a lot of excluding globs, and checking them all is expensive. The files glob (i.e. the glob for files we actually want) is usually just one or two entries, so it's quite fast to check. If find checks the files glob first and then the excluding glob, it has to do much less checking (since the files glob will substantially narrow down the set of files on its own), and find performance is much better. In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") from ~410ms to ~130ms. * lisp/progmodes/grep.el (rgrep-default-command): Move the excluded files glob to part of the "files" argument. --- lisp/progmodes/grep.el | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index ce54c57aabc..84b3b352faa 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1383,7 +1383,17 @@ rgrep-default-command (split-string files) (concat " -o " find-name-arg " ")) " " - (shell-quote-argument ")" grep-quoting-style)) + (shell-quote-argument ")" grep-quoting-style) + (when-let ((ignored-files (grep-find-ignored-files dir))) + (concat " " (shell-quote-argument "!" grep-quoting-style) + " " (shell-quote-argument "(" grep-quoting-style) + ;; we should use shell-quote-argument here + " -name " + (mapconcat + (lambda (ignore) (shell-quote-argument ignore grep-quoting-style)) + ignored-files + " -o -name ") + " " (shell-quote-argument ")" grep-quoting-style)))) dir (concat (when-let ((ignored-dirs (rgrep-find-ignored-directories dir))) @@ -1398,18 +1408,6 @@ rgrep-default-command " -o -path ") " " (shell-quote-argument ")" grep-quoting-style) - " -prune -o ")) - (when-let ((ignored-files (grep-find-ignored-files dir))) - (concat (shell-quote-argument "!" grep-quoting-style) " -type d " - (shell-quote-argument "(" grep-quoting-style) - ;; we should use shell-quote-argument here - " -name " - (mapconcat - (lambda (ignore) (shell-quote-argument ignore grep-quoting-style)) - ignored-files - " -o -name ") - " " - (shell-quote-argument ")" grep-quoting-style) " -prune -o "))))) (defun grep-find-toggle-abbreviation () -- 2.39.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 16:45:18 2024 Received: (at 71179) by debbugs.gnu.org; 24 May 2024 20:45:18 +0000 Received: from localhost ([127.0.0.1]:39102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAbmv-0006WH-NH for submit@debbugs.gnu.org; Fri, 24 May 2024 16:45:17 -0400 Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]:48995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAbmt-0006W6-Df for 71179@debbugs.gnu.org; Fri, 24 May 2024 16:45:16 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id DA7681140157; Fri, 24 May 2024 16:45:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 24 May 2024 16:45:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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=1716583502; x=1716669902; bh=e7yDXM64Vzk8PvLCzeH7viB9ZKOj+5RXX5XMXQ+NRGU=; b= JTjWz+NtmY95YF1wrV1Z27Gt+BxGu7J7rchxvTLITBj1okBgwhkmSnYXYIag67fa ULY3Kw5V0YoQXMznkt3PxEFMHdxxUe9yXwxxRgvw4bRmBqDmJ/mCfq6+6/w/pZZS /5Ic/Se9bNpblNjEQvWUo6EzHJAXpZ05TygA30UiibKicWxQURv4aqmpcCWJjl2z /oeWb1tL6vY9+51pih9C2P9PgGHTN073T4dKE9+rzLY5mwNBuAFKj/vQ0f++L2db ijzI28w0LttgjdbdryTjAzpMm/j5Q89VN2TLSueymIrqJT1H2OJukBiEsGxvL55g 4gVEXs5GkyJA+wP+P2fQIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1716583502; x= 1716669902; bh=e7yDXM64Vzk8PvLCzeH7viB9ZKOj+5RXX5XMXQ+NRGU=; b=U UB62+cHd9HsUlryQMg7ywkSWUmsdhPiAkmCpq1vEwX5HSEt9DMjBkiQrgrTlGJFy BDMoClTGj/FqEBpJzhvEPZY0cJIpP3uAXOdWefkFDJXsKhqq5tQhFjOsOdnXLA3O i5qRGIF7umfAvHEzxel7aNLkGWC8YK599qMJqpDn8bZ58pbORCbnd+weZj2tBcGr xGpWeaG91ziq7p4YXOS/V4q0285R9JOTAeiy9UgaR10b99/rD8lrx4wj+OUzY2iW p28nA11lHUZxu4TaTgeaxGbB8rx9DrsVzUZIXOnFpSprgpgdcGu832ToBuKCyHKG dJGkT3eACTHxDZKTy1xVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeikedgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnheptdfhuedvtdevleegueelvedvjeevheffveevhedvuefftdefhfdvueeggfet gfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 May 2024 16:45:01 -0400 (EDT) Message-ID: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> Date: Fri, 24 May 2024 23:45:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Spencer Baugh , 71179@debbugs.gnu.org References: Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Spencer, On 24/05/2024 23:14, Spencer Baugh wrote: > If find checks the files glob first and then the excluding glob, it has > to do much less checking (since the files glob will substantially narrow > down the set of files on its own), and find performance is much better. > > In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") > from ~410ms to ~130ms. I can confirm improvement here (though not exactly 3x). 1.9s to 1.3s in a Linux checkout, for example. Nice. Moving the files exclude instructions to the placeholder is a slight incompatibility, but I wonder if there are any custom grep-find-template values which would be bothered by it (that's the only incompatibility I could think of). Perhaps those that currently don't include at all? From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 16:54:53 2024 Received: (at 71179) by debbugs.gnu.org; 24 May 2024 20:54:53 +0000 Received: from localhost ([127.0.0.1]:39142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAbwC-0006a5-Qh for submit@debbugs.gnu.org; Fri, 24 May 2024 16:54:53 -0400 Received: from mxout6.mail.janestreet.com ([64.215.233.21]:50313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAbwA-0006Zz-3C for 71179@debbugs.gnu.org; Fri, 24 May 2024 16:54:50 -0400 From: Spencer Baugh To: Dmitry Gutov Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files In-Reply-To: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> (Dmitry Gutov's message of "Fri, 24 May 2024 23:45:00 +0300") References: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> Date: Fri, 24 May 2024 16:54:37 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716584077; bh=9qP3TUh5+OFvT30cG03DCS2MQjbcLk4LO19t4Hu3mt0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=GbqXsVdIQrBIne4G4wIScEZnBc7ZsPkjytm3UtUPhWz9huIFO2D7el1iHg0bb7VIt 2rayomHRC7/3MjNZSEiiDNiWWnXDrGUOpbMW52b3XzehYu69X1zyaLkv4KwyEdPfUO 0vl9y6rS2RuT+Ts7S4ss8uIKaqCuUUETVMt4OYAFB45Z+2lIsgZH9/itrlKBmr9aww mqVjUfszy8wCJAEZZA2zUZt7LzuGMqubxlsDPU5/tump5NTxCtD69b82Xl7DhBmD3W lvUIV2cCU3Rf31iOv4W7cSBnre1NZo2RBDzj3YFdPbXVkjH1vk+XIFYH15tunWtS+6 HxVqDl0tzpQ9Q== X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 71179 Cc: 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Dmitry Gutov writes: > Hi Spencer, > > On 24/05/2024 23:14, Spencer Baugh wrote: >> If find checks the files glob first and then the excluding glob, it has >> to do much less checking (since the files glob will substantially narrow >> down the set of files on its own), and find performance is much better. >> In my benchmarking, this takes (rgrep "foo" "*.el" >> "~/src/emacs/trunk/") >> from ~410ms to ~130ms. > > I can confirm improvement here (though not exactly 3x). > > 1.9s to 1.3s in a Linux checkout, for example. Nice. > > Moving the files exclude instructions to the placeholder is a > slight incompatibility, but I wonder if there are any custom > grep-find-template values which would be bothered by it (that's the > only incompatibility I could think of). Perhaps those that currently > don't include at all? A grep-find-template that doesn't include will indeed start seeing ignores based on grep-find-ignored-files in rgrep. But, such a user can just set grep-find-ignored-files to nil and then they'll stop seeing ignores again. Also, for what it's worth, note that the documentation for grep-find-template says this: - find options to restrict or expand the directory list - find options to limit the files matched So this change makes the documentation more accurate: previously also affected the files matched, but now it only affects the directory list, as documented. continues to limit the files matched, as before. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 02:37:08 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 06:37:08 +0000 Received: from localhost ([127.0.0.1]:41476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAl1f-0003Lg-P7 for submit@debbugs.gnu.org; Sat, 25 May 2024 02:37:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAl1d-0003LI-Oh for 71179@debbugs.gnu.org; Sat, 25 May 2024 02:37:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAl1Q-000186-Sj; Sat, 25 May 2024 02:36:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xm3JBJJb/qytR+Wj1sWP6sbrxd7uMKg8ihm69+0kva0=; b=ZtpA2p3gVyHY 8W+LL3TfPwJqzODSro3ihTU1EtrynSXKs5Kkw5XdqPLTncSXTO4WWOUVItLlUrCX7zGJ9SqM7Psat gTvS7O2qo7NrfHsWc79Xj8sstx0Dkf0UNJhSsRIPKw6tn5R7wrilg1hoxZruKp+o3xgbRFrTlcXIm MRXEfjOCjDTzO6VdYeByIlLBhXKqWsDTT1DBBQ74taMQaGAYYnFY7tTYJedOnajfxzXORB874u0sO YGuCc+v9X9tSvJimjjyAzk+Q6DwztMkbrEsB4jRxo9/d1cHRqghAWkoq9xUdpmms5RglWztJY5MZd UkpeqyMSqyJTb7gUSdcavA==; Date: Sat, 25 May 2024 09:36:45 +0300 Message-Id: <86jzji1jpe.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Fri, 24 May 2024 16:14:39 -0400) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > From: Spencer Baugh > Date: Fri, 24 May 2024 16:14:39 -0400 > > In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") > from ~410ms to ~130ms. Which is a minor improvement at best, possibly a negligible one. In my testing (on MS-Windows), I see a barely-tangible improvement: 0.7%. > Date: Fri, 24 May 2024 23:45:00 +0300 > From: Dmitry Gutov > > > In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") > > from ~410ms to ~130ms. > > I can confirm improvement here (though not exactly 3x). > > 1.9s to 1.3s in a Linux checkout, for example. Nice. Which is still quite minor. > Moving the files exclude instructions to the placeholder is a slight > incompatibility Right, and for that reason, we cannot install this change as-is. We need either a different command or a user option controlling the order (with a good explanation of the effect of the difference). > Cc: 71179@debbugs.gnu.org > From: Spencer Baugh > Date: Fri, 24 May 2024 16:54:37 -0400 > > > Moving the files exclude instructions to the placeholder is a > > slight incompatibility, but I wonder if there are any custom > > grep-find-template values which would be bothered by it (that's the > > only incompatibility I could think of). Perhaps those that currently > > don't include at all? > > A grep-find-template that doesn't include will indeed start seeing > ignores based on grep-find-ignored-files in rgrep. But, such a user can > just set grep-find-ignored-files to nil and then they'll stop seeing > ignores again. That's not a valid argument for changing the default behavior. Because I could counter-argue that if you don't care about the order and want those few hundreds of millisecond at all costs, then _you_ can customize the template to your liking, leaving the default behavior intact. > Also, for what it's worth, note that the documentation for > grep-find-template says this: > > - find options to restrict or expand the directory list > - find options to limit the files matched > > So this change makes the documentation more accurate: previously > also affected the files matched, but now it only affects the directory > list, as documented. continues to limit the files matched, as > before. Sorry, such incompatible changes are not acceptable, definitely when the gain is so small. Correctness trumps speed. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 08:27:16 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 12:27:16 +0000 Received: from localhost ([127.0.0.1]:43139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAqUV-0001tC-KB for submit@debbugs.gnu.org; Sat, 25 May 2024 08:27:16 -0400 Received: from wfhigh3-smtp.messagingengine.com ([64.147.123.154]:33121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAqUT-0001sq-Ub for 71179@debbugs.gnu.org; Sat, 25 May 2024 08:27:14 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 75A431800070; Sat, 25 May 2024 08:27:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 25 May 2024 08:27:00 -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=1716640020; x=1716726420; bh=K1rRcVQVaocxNwCv3bNzvtxWRVFYhiAMJcQcPsZVw6U=; b= eSnS2jr4A/M0uSeeqQgbZYjukZA+mApXiXtztkseUbRiJ+G3SPFHMawJzga1hj/f x8WXyigsXLt6To3o8MaN8Ewo15qrcbt7w7fYDxiIxB4HH1rxXbDvfQnpxYV4YfJs Qwnp7lopWjRJoM04GaW6HVUF5Aw5KWUTb/pQC25qMzdWOwasGTB/XEbs8DIXkeux 41iuCnMZNeFNFoPBC6BsnekZjQ4Gf4Xaj0DPzQlUesNPv42Kv4zfFy3XFXzWCsZf TEamob/Umkv33V8jRneTk4/UAnIfl3XfzZ3AcTrsf+3A0vBzi0QxX0ws90h0ZOrL //2czSBHGjXO56ouSJCO3A== 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=1716640020; x= 1716726420; bh=K1rRcVQVaocxNwCv3bNzvtxWRVFYhiAMJcQcPsZVw6U=; b=P GNGyn+PD4CuxvgG6lcD1ZbjDWAgQUo3bTVM3PVAmBYO/oLZVEiVyEyjPfIYrpvyM pxm9SnhHnZwQxN8a3hwnOm91kvD7R9sM3C+hFZ0tAN3ra7O8f/uEmdecsmqDtAjk +cUFs6Ds6Dehrv/xBi9EoQMtgQaiY8CWEb1yChQReaxIeu6qL9wssy7tMq76ob3b GCHpUg6ZSSL0wcg6PQ47gBXZvy63gmL+cVnHFECbNrO6Il3nuU/6QGc/gRlGwQvH r0Uvy9uEGCMTl7Jh+C62DYe8QGcjHQoQdb2PUlY/+gYTanJJGRDfwQmP+KVsTzTL LzoIKAqY6rlYM8ZWv1lpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejtddghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 May 2024 08:26:58 -0400 (EDT) Message-ID: Date: Sat, 25 May 2024 15:26:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii , Spencer Baugh References: <86jzji1jpe.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86jzji1jpe.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25/05/2024 09:36, Eli Zaretskii wrote: >> From: Spencer Baugh >> Date: Fri, 24 May 2024 16:14:39 -0400 >> >> In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") >> from ~410ms to ~130ms. > > Which is a minor improvement at best, possibly a negligible one. In > my testing (on MS-Windows), I see a barely-tangible improvement: 0.7%. That's unfortunate, but I think we prioritize GNU systems when making such decisions. I suppose filesystem access has more overhead on MSW, or there are other problems with the port. >> Date: Fri, 24 May 2024 23:45:00 +0300 >> From: Dmitry Gutov >> >>> In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") >>> from ~410ms to ~130ms. >> >> I can confirm improvement here (though not exactly 3x). >> >> 1.9s to 1.3s in a Linux checkout, for example. Nice. > > Which is still quite minor. A 30% improvement is nothing to sneeze at, especially for a code change as simple as this one. I've tried the "gecko-dev" checkout, and there the change is from 6s down to 1.9s when searching for .cpp and from 6s to 3.7s when searching for .js (the top #1 file type, 25% of files in that project are .js). Naturally not all cases will see an improvement, but many will, and for example 'xref-find-references' also uses grep-find-template (by default) and specifies a list of file extensions - so it should also get faster. >> Moving the files exclude instructions to the placeholder is a slight >> incompatibility > > Right, and for that reason, we cannot install this change as-is. We > need either a different command or a user option controlling the order > (with a good explanation of the effect of the difference). A user option might work, but before we add one it would be great to understand who are the users that it is for. >> A grep-find-template that doesn't include will indeed start seeing >> ignores based on grep-find-ignored-files in rgrep. But, such a user can >> just set grep-find-ignored-files to nil and then they'll stop seeing >> ignores again. > > That's not a valid argument for changing the default behavior. > Because I could counter-argue that if you don't care about the order > and want those few hundreds of millisecond at all costs, then _you_ > can customize the template to your liking, leaving the default > behavior intact. I don't think you can get the same effect just by editing the template. >> Also, for what it's worth, note that the documentation for >> grep-find-template says this: >> >> - find options to restrict or expand the directory list >> - find options to limit the files matched >> >> So this change makes the documentation more accurate: previously >> also affected the files matched, but now it only affects the directory >> list, as documented. continues to limit the files matched, as >> before. > > Sorry, such incompatible changes are not acceptable, definitely when > the gain is so small. Correctness trumps speed. Can you think of a specific problematic usage? The way I see it, grep-find-template is not really portable between different programs: supporting in the format we're passing to it basically requires 'find' to be used (there are no compatible alternatives). That would mean that passing the same arguments to should work fine. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 08:31:23 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 12:31:24 +0000 Received: from localhost ([127.0.0.1]:43160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAqYS-00026i-H2 for submit@debbugs.gnu.org; Sat, 25 May 2024 08:31:23 -0400 Received: from wfhigh3-smtp.messagingengine.com ([64.147.123.154]:54215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAqYQ-00026I-Cf for 71179@debbugs.gnu.org; Sat, 25 May 2024 08:31:18 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.west.internal (Postfix) with ESMTP id 00D2E1800070; Sat, 25 May 2024 08:31:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 25 May 2024 08:31:05 -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=1716640264; x=1716726664; bh=ZrTFJpz4wpZR0lbee59MzgcrS12Vg3ZjJudPzid8b/g=; b= pcvz2ExXFSLp4RJ/vMMXd+HcqabdByGdPxiUKk62E0tyZ/YdWU8UDMxwDL3U0JGZ 1E/jwts6pqPqfYRnN9pPQKfkAzfGX3TXoQRBFQfIr6YmXOn36EWbdt/fIKMqp7CM m0Gw9MOQGCdyfJ8weytTt66jlB0oF4zlNNq+u2sqa/AbGTYAuOEl4RhXggoYPaPe xl/MoBKK9KXcRSIho1ea3RuGiebmH6O0y9qjtDJjJO9AA1VMqGK9O3IPSu1bdvsX eYUoQL5eOzwnbb1PlZ4WqFlRt2CiYemrIqV82NQuqiIDT3rxoY4g91YSyk8c9Zpp z0a2vBYOnb24Go8sDbCOsA== 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=1716640264; x= 1716726664; bh=ZrTFJpz4wpZR0lbee59MzgcrS12Vg3ZjJudPzid8b/g=; b=Z JBSxGPFFdBPTHsKBVIvaeZ/1M91Y4o/+7Ezx7IuiztyNuGn7uBhsyc0l3kIz9IkV 2k+v6YSEa0kEki383SMQFPvwIBkmCBVeCYd0XHmA+4/pZJbezZjVX3uFlht4auRg h0P521jLXMaxASpqKvLGdXJ5XL1ALnjdR8vNWivI/L996c37drffvFdUuI9Lc4Mh jDG7I3cz72mkuwDFIUkhvG1LguqE6sa9dtFazrqnDS0Q2z13SdrIWiA2bc0mTm1O mVoFpwvaHANmQMmGIksJCjVW+luwOXOn4puQaS49OSIX+2J1/vt1WA8e8J+ysfDI N41efW6YHB6gep6I9nZQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejtddgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 May 2024 08:31:03 -0400 (EDT) Message-ID: <2c4c0319-b16e-4912-9991-3f6ad5a035a0@gutov.dev> Date: Sat, 25 May 2024 15:31:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Spencer Baugh , Juri Linkov References: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 24/05/2024 23:54, Spencer Baugh wrote: > A grep-find-template that doesn't include will indeed start seeing > ignores based on grep-find-ignored-files in rgrep. But, such a user can > just set grep-find-ignored-files to nil and then they'll stop seeing > ignores again. Yeah, that sounds like a good enough solution for such cases. I recall that Juri experimented with customizing grep-find-template (to use ripgrep? and perhaps other things). I wonder what he thinks about this patch. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 08:51:31 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 12:51:31 +0000 Received: from localhost ([127.0.0.1]:43255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAqry-0002uD-Uk for submit@debbugs.gnu.org; Sat, 25 May 2024 08:51:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAqrw-0002u5-Fb for 71179@debbugs.gnu.org; Sat, 25 May 2024 08:51:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAqrj-0003HC-4t; Sat, 25 May 2024 08:51:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xGsy+A4WrzAxGMIFXhZjOC/uGW+G0sUKNhQBjWDPRFw=; b=o79vGiQfg201 SBba7Gvy3Ea6jEnP5kg3DcV4/qYW7eK1ijhUdEY2XSA4DHJEN6wtQRnw/I02aM05pvNlXuaIowZLM 6dcri7jEn2jpPylUsbAQgps3evsgSvYL3Nxu7WaMN2PNmyJxrRvs+FjD5en+dh/LiJ7aO6QsafTOs E2UwpXuBw8mXNROUBswHU++80RVH357aJSnF3rAiFxstsuBoQvz8AEgMmwvTTu4FsvhfuVC0X8gD3 x3tHgs/b7dpgizgUA02ng0SvbN0RzPb4vNWjX+HbMsllI0i1W1MfePdtcvAfQ1OV9oDvn1ZuCrRXN F11huFgCsxOcZhbsoFZ/EQ==; Date: Sat, 25 May 2024 15:51:13 +0300 Message-Id: <864jamyrzy.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Sat, 25 May 2024 15:26:56 +0300) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: <86jzji1jpe.fsf@gnu.org> X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > Date: Sat, 25 May 2024 15:26:56 +0300 > Cc: 71179@debbugs.gnu.org > From: Dmitry Gutov > > On 25/05/2024 09:36, Eli Zaretskii wrote: > >> From: Spencer Baugh > >> Date: Fri, 24 May 2024 16:14:39 -0400 > >> > >> In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") > >> from ~410ms to ~130ms. > > > > Which is a minor improvement at best, possibly a negligible one. In > > my testing (on MS-Windows), I see a barely-tangible improvement: 0.7%. > > That's unfortunate, but I think we prioritize GNU systems when making > such decisions. We do. I just added one more data point. > >>> In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") > >>> from ~410ms to ~130ms. > >> > >> I can confirm improvement here (though not exactly 3x). > >> > >> 1.9s to 1.3s in a Linux checkout, for example. Nice. > > > > Which is still quite minor. > > A 30% improvement is nothing to sneeze at, especially for a code change > as simple as this one. They are 30%, but they are only 600 milliseconds. > >> Moving the files exclude instructions to the placeholder is a slight > >> incompatibility > > > > Right, and for that reason, we cannot install this change as-is. We > > need either a different command or a user option controlling the order > > (with a good explanation of the effect of the difference). > > A user option might work, but before we add one it would be great to > understand who are the users that it is for. The ones for whom the proposed change will affect the results. > > Sorry, such incompatible changes are not acceptable, definitely when > > the gain is so small. Correctness trumps speed. > > Can you think of a specific problematic usage? Why is that needed? Isn't it clear that it can happen? From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 09:03:19 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 13:03:19 +0000 Received: from localhost ([127.0.0.1]:43310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAr3P-0005sf-2N for submit@debbugs.gnu.org; Sat, 25 May 2024 09:03:19 -0400 Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:59151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAr3N-0005sX-TN for 71179@debbugs.gnu.org; Sat, 25 May 2024 09:03:18 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 738611C000C4; Sat, 25 May 2024 09:03:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 25 May 2024 09:03:03 -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=1716642183; x=1716728583; bh=EH3YEXOazMu+Q9QsTCC95Sbka2qaMT9V7Ga2y1o4UEg=; b= bNLPPIsOyPFBZv9FMs3i5Nx4raVCF+euX1pTTcM6CUu1hWqdJWrhtEc5pR3NkHHN 21hxVqizuxkl9pBQWgxgygUtnchbIkttEENeuAytQiV0WQtAEFe9PBgTYsfRQYSo KH4eip5RhHTX0w+kQ152sDNySBQkFX6CuxuHCOotlg8fuh/FpwFepzhHQSWOFb/Y 2AwxZRhf0oeOvFPNPy80/r7P3TE2pVBCk/kRW9VJX11kGYFu1oQDiiirc86AI6NM xuNWKDenD8y0Bn5MmQxwKEaxQMcs0rFz4nSX0F72Q1rPguAVTu70dVK12uVHYah5 Gs+rfj6AORdiaQNPRkXuZw== 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=1716642183; x= 1716728583; bh=EH3YEXOazMu+Q9QsTCC95Sbka2qaMT9V7Ga2y1o4UEg=; b=l rwI1moxjP8ePI0kvQJU/Y2ume2aeLj8n/RFxpNy5JPJYa2mmky7iXlpbHdhrijxO smKWEX0EAJpcckOzFMyjTVjC4n/AOrlEvrHL+2gukWHaAKcTRrgbjoqSDuhGMA/Y 73AXOG1gRZKAEHxTXLXSwGSrbRoUMetwSTdb43nYrQYo7hvcfQBBwEqW639wHlMx g6NyqmBrRgTC/zZWdqfXrEcdvWfWzMCin9quF4pZ2AevJ5nroFMZmLZBvcCFDNdI WCua7/ISfkG+poevAd/4bbmh9w0K2Kf4B0DC8vKtEEQhraRy+HFBIt5EpPMCsUnf n9hEmd28sfrLvrMexD0qw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejtddgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 May 2024 09:03:01 -0400 (EDT) Message-ID: Date: Sat, 25 May 2024 16:03:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <864jamyrzy.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25/05/2024 15:51, Eli Zaretskii wrote: >>>>> In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") >>>>> from ~410ms to ~130ms. >>>> >>>> I can confirm improvement here (though not exactly 3x). >>>> >>>> 1.9s to 1.3s in a Linux checkout, for example. Nice. >>> >>> Which is still quite minor. >> >> A 30% improvement is nothing to sneeze at, especially for a code change >> as simple as this one. > > They are 30%, but they are only 600 milliseconds. On my top-of-the-line laptop, even if it's a few years old. Take an older or slower machine - and you might as well see a multi-second difference. Just like in my example with the bigger project anyway. One of my personal aims is to make Emacs more viable even for those who work on large projects. That's why I routinely test certain operations with Mozilla's codebase. And AFAIK Spencer's codebase is even larger. >>>> Moving the files exclude instructions to the placeholder is a slight >>>> incompatibility >>> >>> Right, and for that reason, we cannot install this change as-is. We >>> need either a different command or a user option controlling the order >>> (with a good explanation of the effect of the difference). >> >> A user option might work, but before we add one it would be great to >> understand who are the users that it is for. > > The ones for whom the proposed change will affect the results. > >>> Sorry, such incompatible changes are not acceptable, definitely when >>> the gain is so small. Correctness trumps speed. >> >> Can you think of a specific problematic usage? > > Why is that needed? Isn't it clear that it can happen? Provided we do add an option, knowing the actual audience could help name it better and document it better. But so far the audience I can think of is the very rare people who misused the template's customization. And those can use an existing option. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 09:36:59 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 13:36:59 +0000 Received: from localhost ([127.0.0.1]:43472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArZz-00078O-5T for submit@debbugs.gnu.org; Sat, 25 May 2024 09:36:59 -0400 Received: from mxout6.mail.janestreet.com ([64.215.233.21]:55203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArZx-000782-5d for 71179@debbugs.gnu.org; Sat, 25 May 2024 09:36:57 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files In-Reply-To: <864jamyrzy.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 May 2024 15:51:13 +0300") References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> Date: Sat, 25 May 2024 09:36:44 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716644204; bh=xEkreuxb4SKPxgR2+8IiU8/q6nkhsIls7ZlrEQSvO+A=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=03nVTUjgirHX//kk5PpGvRJNtCf7G6LJk7//q8r9CKdv6UTrVyk/uBT8I9eDohtMB OupA4NYzqYEEzJg7LQCAdqJZA/qmtsbXZ3JUqfASoIcbbgTJi+U70/R8KOxjgATUlh g+kBfQLzQEYTG56YeuJq1Dq81bNE2LsTgl9Sy5R5BvSGz6d8Z43NUQ7F2b/ic+Zan0 jit2knG5vy2NBUc6kVhvEItNv24dSpz6OJPAAHVVzGwpoK+dCs9rYP+BwVh2ZBn4lU W2rpehZUUCr46ELchVz1RRITjH5oMufn2O75IiBZ2DgP/Qypsfr3thJrkbIvZhqeca zSm0OL8VpQYSA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: Dmitry Gutov , 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > The ones for whom the proposed change will affect the results. To be clear, the proposed change will not affect the content of the results returned by rgrep or any code in grep.el. For them, this change has no semantic effect at all, it only speeds things up. The only user-observable difference besides the speedup is that it fixes a bug: grep-find-ignored-files is documented to affect rgrep, and now that variable affects rgrep even if grep-find-template is set to a broken value (one which doesn't include ). It's unlikely anyone is relying on this buggy behavior when isn't present; the much more obvious way and documented way to achieve this behavior is to set grep-find-ignored-files to nil (which still works fine). I suppose we could preserve that bug by conditioning this optimization on (string-search "" grep-find-template), though. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 09:45:31 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 13:45:31 +0000 Received: from localhost ([127.0.0.1]:43508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAriF-0007Wh-7M for submit@debbugs.gnu.org; Sat, 25 May 2024 09:45:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAriC-0007WN-RH for 71179@debbugs.gnu.org; Sat, 25 May 2024 09:45:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sArhz-0006Jh-Dz; Sat, 25 May 2024 09:45:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=g5U2qd06Hw+Z0hZmi3uQ98zR972gEdjSrgtXywKW/OA=; b=o1dopcixctcQ Nrzdf72VT3X8qDI86gegbx3gGTN3n3zMszwgKq1rU8q9tWcKHNqo9lRyKiOmiBIoMqgRvvzF1xBnU fOT0kp+IFddr/2xQleE6rgZNAIWB+BKbmoVE4xQVEFHuOusZHE7pjWW4wl4HwwXkCUP0A8NnVNAoC p/8J/pmJ5BUUpsuzhMqfOta38WqinbyLfBHdtbzKnokLcnRcdg5UhUUgXKXNAmkJbKVAW3L4w94oA QJCWEGp7ISzstlOIIwAycZ7zsxGmxEABsJD403IybHLQE/QlhflKWWlQ3E/LjOKUYEY4P0cygq8TZ 1VbuXm7r0iAUoLwCtFcnLA==; Date: Sat, 25 May 2024 16:45:10 +0300 Message-Id: <8634q6ypi1.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Sat, 25 May 2024 16:03:00 +0300) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > Date: Sat, 25 May 2024 16:03:00 +0300 > Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org > From: Dmitry Gutov > > >> Can you think of a specific problematic usage? > > > > Why is that needed? Isn't it clear that it can happen? > > Provided we do add an option, knowing the actual audience could help > name it better and document it better. > > But so far the audience I can think of is the very rare people who > misused the template's customization. And those can use an existing option. We cannot break user's existing setups, even if we consider them "rare". From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 09:57:17 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 13:57:17 +0000 Received: from localhost ([127.0.0.1]:43560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArtd-000830-0m for submit@debbugs.gnu.org; Sat, 25 May 2024 09:57:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArtb-00082c-8I for 71179@debbugs.gnu.org; Sat, 25 May 2024 09:57:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sArtO-0008R7-0j; Sat, 25 May 2024 09:57:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=I2Hq1ayIpPLAzaQdAn7jo9uCUqXfWxfCNlhtVEMAECM=; b=JhDI7MR6USEQ saJDk8siUTKqninjlVPq73K8k2E0YxO8G37JVDmZITY672M/j8/2bNKNvo8EWbPKHi6NjBq5DUIWN v7zqom44Y0CFknR5Y74B8vpYT+qbDNfaj15rRJB+TwB5rO6bgD/IC3oyBVgHmYt5Fv+bFF7cgFdWF 1E0I1RTtEgB0Ez4jvR/Y6e6Ojv7WNB5vPkgeNRPUkJSiNJdh6G34UehBQ6Z0z3NHK/BORXkJZw6sM Zw9to8NtRTVsZcXtEWjcVPtAv5vhQd/hGW9wQwFrUcYiwZFME68R09A2ACmJ7jiInb5f4kyeeYpPQ TRepOdoCXCYljz3Dd5MKjQ==; Date: Sat, 25 May 2024 16:56:31 +0300 Message-Id: <861q5qyoz4.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Sat, 25 May 2024 09:36:44 -0400) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: dmitry@gutov.dev, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > From: Spencer Baugh > Cc: Dmitry Gutov , 71179@debbugs.gnu.org > Date: Sat, 25 May 2024 09:36:44 -0400 > > Eli Zaretskii writes: > > The ones for whom the proposed change will affect the results. > > The only user-observable difference besides the speedup is that it fixes > a bug: grep-find-ignored-files is documented to affect rgrep, and now > that variable affects rgrep even if grep-find-template is set to a > broken value (one which doesn't include ). You call that "broken", but I disagree. There's nothing wrong with removing from the template. > I suppose we could preserve that bug by conditioning this optimization > on (string-search "" grep-find-template), though. Not good enough, sorry. I'm quite sure other situations will emerge where this change affects the results. For example, you never considered the cases where the files which match the pattern to search also match the ignored-extensions, and many other possibilities. IOW, this proposal is based on a very narrow and very specific usage pattern, whereas the real-life usage patterns are infinitely more numerous. My suggestion is to provide a user option to get back the old behavior (and document all this in NEWS). From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 09:59:02 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 13:59:02 +0000 Received: from localhost ([127.0.0.1]:43575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArvJ-00088G-UH for submit@debbugs.gnu.org; Sat, 25 May 2024 09:59:02 -0400 Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:37077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArvI-00087q-MJ for 71179@debbugs.gnu.org; Sat, 25 May 2024 09:59:01 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.west.internal (Postfix) with ESMTP id 6C1AD1C000B6; Sat, 25 May 2024 09:58:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 25 May 2024 09:58:47 -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=1716645527; x=1716731927; bh=u84Ic+GWwcUIetC6VUt/t3c7cMsGd7VkiNBOxsgr8xM=; b= k6TGRF1yYK8FimItjakr9fyYLwfE6VslMuLZvc3sEBebuYAW0NeNarV5Dt8wENiP N4CmHzEvuXaCxJbQhkAJ61eVCubk5SiNhxdgyNORvYdLuqisa8S1TYd7kPzTLKI9 zcBhFgWfeQdwO98pOGfIRRsOvL2m6wvtS7QYgJGvA0GQ5JNt9GY+XPkr5HTVJQ1t WUTez2vIHDU/aE/joLjx21J9hKg26fXLoR864WHEqNs9HSeQNboNJgsGlm+x8mOL ZozpzzVlNSeBhlDXoDAM4fFjhnb6rqjdDkkY6O4R5XNYkrBw250r4ZAjIky6qG/X 6VPEtELmmtFJrAkRbk6CEw== 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=1716645527; x= 1716731927; bh=u84Ic+GWwcUIetC6VUt/t3c7cMsGd7VkiNBOxsgr8xM=; b=f pwvYYmn/VxsFWuxfTY9D2jP/x3ykPoZQpq33EJ3a1veyRkND+JL8jx0uOsgYGa7P CEnwTqpRMUsYJir7uxKCsK85AAW02aSgzeizpw/vnCic1e+xcxqa/y3dmofIZSv1 E2EyqIBld7xjORJpZH7Xw1EUB89qNqbYr0U0tj+lB3cOeBwMUFA1ovskBhCvjlcw y/RwqYV2s/C907fCPfb19zJdqKWjrBgcvpTu08JENNV3HB2AyrLUtPQLPx/NLVhQ lhDiJ7t9/nfeW7QvhNWaoT7ZwnIOHzHKBTLrAaFU33xgy9h79LjH/sAr2bs1A/RT z1FGQ5DhEo48eCtVXN0MQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejtddgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 May 2024 09:58:45 -0400 (EDT) Message-ID: <44c03daa-a435-45d4-b45b-5b4563b70ecb@gutov.dev> Date: Sat, 25 May 2024 16:58:44 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <8634q6ypi1.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <8634q6ypi1.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25/05/2024 16:45, Eli Zaretskii wrote: >> Date: Sat, 25 May 2024 16:03:00 +0300 >> Cc:sbaugh@janestreet.com,71179@debbugs.gnu.org >> From: Dmitry Gutov >> >>>> Can you think of a specific problematic usage? >>> Why is that needed? Isn't it clear that it can happen? >> Provided we do add an option, knowing the actual audience could help >> name it better and document it better. >> >> But so far the audience I can think of is the very rare people who >> misused the template's customization. And those can use an existing option. > We cannot break user's existing setups, even if we consider them > "rare". "rare" is an estimation - so far we don't have even one example of a user who does this. And we do break existing setups from time to time, usually with good reasons (but those are in the eye of the beholder). We weigh the tradeoffs. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 10:02:28 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 14:02:28 +0000 Received: from localhost ([127.0.0.1]:43608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArye-0008LM-7R for submit@debbugs.gnu.org; Sat, 25 May 2024 10:02:28 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:60761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAryc-0008Ku-C1 for 71179@debbugs.gnu.org; Sat, 25 May 2024 10:02:26 -0400 Received: from mail-ej1-f72.google.com ([209.85.218.72]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.97.1) id 1sAryP-000000036Gb-3MNo for 71179@debbugs.gnu.org; Sat, 25 May 2024 10:02:13 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a6269ad7288so85062266b.2 for <71179@debbugs.gnu.org>; Sat, 25 May 2024 07:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1716645733; x=1717250533; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U+J2Y2SL6I88logK5S0Tt8rVw4gpASwI7Gu0+oNHcw4=; b=lFHE1a6bASKMU4KDAeb8Gss/PpkYxBQ07de9P9RbptWxu7zI1b5TGpWOHhaY4+Kd1e jzLHDQIM/L6peTNxoQ1YciAFiZrmETsEGSuctwMYu9tFAOj0Bw0/ZDQfGwdxEIR4DdGT 2teYYxk3ldTduIfzbevHdgohIiCSvOsfRxmIA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716645733; bh=U+J2Y2SL6I88logK5S0Tt8rVw4gpASwI7Gu0+oNHcw4=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=w3j/fjTDpkMOrzwt7jymZk6mBEw8qFamBl6j7CE3Gj1JMCv3BLoYUDl9lIjWJQgeL Cbo+Xkw5Yr5JZaGvJiibwUMYS6NJpddzpGSHNGEkli41Bp6jM0/gMKNLEyfsBOUywy BVqtN5nwYG6ARBAvH9MweXh3MiZdi2ir7nK5KITwVyAwEa7IyXpdQCNEBOKBvoTcUb 1gZgO3/OCN/X1PelTBdAFqZuigUsL1AwnUrYDJaMiOgm1FcF+0Ko4Xff7yaxWgFXXQ q1lOdTKsPOZ241v07oLSsMPfdAqLASky6UB572Lq8TSaAv2x/6kBybmsHE9oEv5dnl C+lQ/NeVH5Aqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716645733; x=1717250533; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U+J2Y2SL6I88logK5S0Tt8rVw4gpASwI7Gu0+oNHcw4=; b=Wk1SOkVTgJkvk8NPkUaeQHvKbCU6I3n6WYyOGMpYljcSw73YBsI02Zo/Vr+P03Vvtk cXcp0/dhs95L0pRrIPg3sfqmu+j2YEYQFh5+xm9I46Hly8uQOYHIot0syxOwfPdqh0PW r9s1rhIDRxC+PVfOPhOhjwcInsPTCurUok/SYLODnqwQ/URfbrg4jMcoRFMCCoPZp9+H 5YYJv1QF/VxOJS1SasyUlGV0lTj4uprLzoqBRWdvf6xBjwAC+n+jl+beH23F8AaHJNnE FcYwiSk68x2IFzjnOiOs+AvIhS/QRqx14oPlfNc0zTAwE1QTYE8qN85hETrudtR9vQho tF/Q== X-Forwarded-Encrypted: i=1; AJvYcCW9g8XCY3/Z81TL3GX0NkDRTay7+Gan4XklTX5pMJbAKrieiIDtnShDlrkiD2bTpYU/kXrWUyMpg8ZcL9qlGI6ajLMGkFU= X-Gm-Message-State: AOJu0YyyuW+vP8CRyU527bgtg2TFZjbo0JSUn4LHrTHqvGj43c3lmlhl pHHaScPRqC5HBK1F1ENuhqrr7THcJvv9nS/Zs4iK6ook4gXjbXwnBba59b0vu06X9SDlZLLNrgZ EqjR1YHai+MTYV1WHtn0LFAeu8QGrM7OrtBgyu1osjjU6Y9RFwVMiXeKdv3pRMSRi/7lHFPVi8z 9hFraG0a6MK3ZNVylR3qsuQ/U+sg== X-Received: by 2002:a17:906:55d3:b0:a5a:54ca:5bf9 with SMTP id a640c23a62f3a-a6265116b37mr301837066b.64.1716645732834; Sat, 25 May 2024 07:02:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1Wy2NMP45CcOpwQ7Zpw4y5W/JcRl6gu3WrwKA9ajtfwh8v+MDYtq/gGX18ARqIYDHwaN687HG4iPsf6xBr+c= X-Received: by 2002:a17:906:55d3:b0:a5a:54ca:5bf9 with SMTP id a640c23a62f3a-a6265116b37mr301835966b.64.1716645732441; Sat, 25 May 2024 07:02:12 -0700 (PDT) MIME-Version: 1.0 References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> In-Reply-To: <861q5qyoz4.fsf@gnu.org> From: Spencer Baugh Date: Sat, 25 May 2024 10:02:02 -0400 Message-ID: Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000001680ed061947bbf8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: Dmitry Gutov , 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000001680ed061947bbf8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 25, 2024, 9:57=E2=80=AFAM Eli Zaretskii wrote: > For example, you never > considered the cases where the files which match the pattern to search > also match the ignored-extensions, and many other possibilities. In that case the file will not be searched, same as before this change. No behavior change. What other possibilities? --0000000000001680ed061947bbf8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, May 25, 2024, 9:57=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
For example, you never
considered the cases where the files which match the pattern to search
also match the ignored-extensions, and many other possibilities.=C2=A0

In that = case the file will not be searched, same as before this change.=C2=A0 No be= havior change.

What othe= r possibilities?
--0000000000001680ed061947bbf8-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 10:13:36 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 14:13:36 +0000 Received: from localhost ([127.0.0.1]:43669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAs9P-0000VO-Kk for submit@debbugs.gnu.org; Sat, 25 May 2024 10:13:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAs9O-0000Ux-Hh for 71179@debbugs.gnu.org; Sat, 25 May 2024 10:13:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAs9A-0002za-Bo; Sat, 25 May 2024 10:13:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=CDSl43f4bP7zIWlQiJxRHuTfNuZRFot5Ml6XHUwBXsQ=; b=q9ok1lz84/9KjrZAxVFt zHTOCLYcNQQnt+xk1IVXr6mWg8Sjkkdyz+M1UV+rKEeA/ACXFlUiWyousfb2FM5/eqTEQoS3tBx/0 6PqF6GPczvBALVGGL3s58aCBgMdmzhnjf4m4kZtKfhwKJOOLZITaLdEVThbkA4OmCGTL7INttxjqK N53R43F7mXlm0nZcdYuLatx5tVO3O4fV0DtdRJFPNHFDLnVrkIyZZGGsesi+Jka/Vfw5obtiHJoqC 2aeopUZvHvpKp9qa0aKs9po21yRiQurfI7VyfLvYjgesfo30fD4ryIR+/wD2lSh93L0FKOKNZXrLg WYgdRO97/Z/LUA==; Date: Sat, 25 May 2024 17:13:17 +0300 Message-Id: <86zfsex9mq.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Sat, 25 May 2024 10:02:02 -0400) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: dmitry@gutov.dev, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > From: Spencer Baugh > Date: Sat, 25 May 2024 10:02:02 -0400 > Cc: Dmitry Gutov , 71179@debbugs.gnu.org > > On Sat, May 25, 2024, 9:57 AM Eli Zaretskii wrote: > > For example, you never > considered the cases where the files which match the pattern to search > also match the ignored-extensions, and many other possibilities. > > In that case the file will not be searched, same as before this change. No behavior change. We are talking about performance here. > What other possibilities? Who knows? Why risk any changes at all? Anyway, I suggested an approach that should leave everyone happy. Why are we still arguing? From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 10:48:09 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 14:48:10 +0000 Received: from localhost ([127.0.0.1]:43847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAsgr-0002Dr-H3 for submit@debbugs.gnu.org; Sat, 25 May 2024 10:48:09 -0400 Received: from wfout1-smtp.messagingengine.com ([64.147.123.144]:43997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAsgp-0002DR-1w for 71179@debbugs.gnu.org; Sat, 25 May 2024 10:48:07 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.west.internal (Postfix) with ESMTP id BD6241C000BF; Sat, 25 May 2024 10:47:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sat, 25 May 2024 10:47:54 -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=1716648473; x=1716734873; bh=JuqA3cWV3ixhXY+9EpU9fRrKKFW4ayOUh3WqVhyo0vk=; b= DPL3n0ijgN/Qmhnl3gNsU6lDVDKh3wBiBp4767Vpuv6xQaGXx2aAlkL/aJKmzO+W 2AaaqLTM9zo1qjKcBxPrfj8CrUHN1dhdIjOKNG//euiqalUCTsj6V7BZAH3bnIsl nZTekH37cA9sjBbInRUmKnoYgJ1/Kjh8fAl6VsaIVvXcNHgXDa1hss7p6gMIgWMc Xplm9bwjvhShObjLB4RFwLHtg44HLeb1casURcp/WssRds9x/t41KRZ37prYkX8e waVsvxIQEQ/k7sJ7fzNlHkPuvOeY+PYUfoKZdKSP85C6PGw6F9nCcW3Lsi7pYk37 GOtnpyv4bjMFdxoQR+E3YQ== 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=1716648473; x= 1716734873; bh=JuqA3cWV3ixhXY+9EpU9fRrKKFW4ayOUh3WqVhyo0vk=; b=b FviDUoF8YuvLp0IrqmeWRipQjFvhLUKAOy1E9iqijlemy5hLwPkKlpXB5oWr09Kr y/pfRxu1QP6meLMgTaaApOE5aFpJ2XE8tnT0e3S5ILtct4jGkIR/yTFKlgXpCXdH zLRld1A7+1O9mpeTLcYeSbvfM6gKqsbcJ4A0AEXu1MoIpvAsYaspcMzYsBRm73kV uaGcNVie6K95yNq2EX1viU2Eyj9aG6psF/5Mef/8C0wN5MFaEjBexnFJvCYH6MuW ULVTjBE9U11M92RXvhMDLzo0oNW2M5oPsfNQJ0ZaMTWFZFvoB13qkyBHZMNprsZv qgpVLneTM/CUhvevIso5w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejtddgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 May 2024 10:47:51 -0400 (EDT) Message-ID: <7308511a-b031-44f9-8460-2b5d85739bcb@gutov.dev> Date: Sat, 25 May 2024 17:47:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii , Spencer Baugh References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> <86zfsex9mq.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86zfsex9mq.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 71179 Cc: 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) On 25/05/2024 17:13, Eli Zaretskii wrote: >> What other possibilities? > Who knows? Why risk any changes at all? > > Anyway, I suggested an approach that should leave everyone happy. Why > are we still arguing? New option has the usual problems: * What to call it. * General proliferation of new options makes it harder to find each one. * Several days of arguing whether we can make the new behavior the default one. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 10:51:29 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 14:51:29 +0000 Received: from localhost ([127.0.0.1]:43864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAsk5-0002Mg-5y for submit@debbugs.gnu.org; Sat, 25 May 2024 10:51:29 -0400 Received: from wfout1-smtp.messagingengine.com ([64.147.123.144]:44219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAsk3-0002MM-Ek for 71179@debbugs.gnu.org; Sat, 25 May 2024 10:51:27 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 2E16C1C000BF; Sat, 25 May 2024 10:51:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 25 May 2024 10:51:14 -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=1716648673; x=1716735073; bh=b8vz4CPzjJbdOhec+CHH6uiabuNwrIZWSUkwpOLFf4w=; b= Dy0Hyk/EgtYCzVH4QhlIQQ++JAJ4Yk5d6QK0KjrS/U6AzX0LaPSFUCODLwWHrIOI TrDZ/lK2zclTA4IcG1Uc0t5fIkk+aTHOoobuVhrdtR5b/aAKtSmsIuy40n5UbLG5 Uz6N3aXKDX5d47OejNj9aJfu9yL4WSw9wznb+L83mwJIxeGAvW63uihE6njcvv3R bUS436QJo0HCe0hvRNtg8bB7WWAp68A5DETbt8g7hcOKP17Ccfeg4QR1dDhL4NoV w18HBcPrQEr1LEHGoQvAuHr++bKz2mlcCZcIifNQNBnCwGh78I96gn6u9Im2Meeo wEy5poJ9XGLW3XiJ/3bi6w== 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=1716648673; x= 1716735073; bh=b8vz4CPzjJbdOhec+CHH6uiabuNwrIZWSUkwpOLFf4w=; b=U AiVOjXwlLD/V0cW2KljVC20MRVOKrQxt9Gh0XZ/V/Avk0bRC7fnVw8g/ECovMEIW 1nVsmt9KqFBGm74bft2VBQLzuz+ttRr/KvIm8yKDkzfwqJsHivx/+MOTchAFJ21j 91RrT+90yQqPYE2MmQ0V6UfYs/EsI05SilchZhe5tMPdW93PWQ1bsLjUB8Ui9QQ0 z2FNAKa5KOQ04RQGmy1YTnD+YooFVvMow01TVQG7mHVlpD+JDbWMaTTRJen6fGhg X2PI+04kywRPz2+SjphKgScX5K21tJhNzyXfYoQGl5ziwKjQiwUremtoD1SwdYWJ uiIYJbskstoiiaxrFeW9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejtddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 May 2024 10:51:12 -0400 (EDT) Message-ID: <368566f1-142e-48d2-a54f-44e81ecf8d0a@gutov.dev> Date: Sat, 25 May 2024 17:51:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii , Spencer Baugh References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> <86zfsex9mq.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86zfsex9mq.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 71179 Cc: 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) On 25/05/2024 17:13, Eli Zaretskii wrote: >> For example, you never >> considered the cases where the files which match the pattern to search >> also match the ignored-extensions, and many other possibilities. >> >> In that case the file will not be searched, same as before this change. No behavior change. > We are talking about performance here. FWIW I don't see which performance problem you have in mind. If you mean the possible regression in the case "user picked file extension that's already in ignores", then I don't think it's going to be any noticeably slower in vast majority of cases. And it's not a scenario to optimize for anyway. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 11:07:29 2024 Received: (at 71179) by debbugs.gnu.org; 25 May 2024 15:07:29 +0000 Received: from localhost ([127.0.0.1]:43963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAszY-00038s-Na for submit@debbugs.gnu.org; Sat, 25 May 2024 11:07:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAszW-00038X-LQ for 71179@debbugs.gnu.org; Sat, 25 May 2024 11:07:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAszI-0006Kp-Di; Sat, 25 May 2024 11:07:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=m/6PAqEDsEPVz5Nz78UwWUwGZ/Qq4T8zEMy8L+k1tBg=; b=RSEq7Gqaga0U ctJrhGqXNaqf9WKfNJ35KskoxpR/ChM9YlOu2twYbLh1Pmld1ETjRfJSYLULbm1IPZkkx0Q/HG8HU gApsNkfZDg/mcUu0n00SttgMVVuiKAPVq/+xDAMVw39wWdrT76Wo3ktW+kIjC6sUgI6dIZpyzsA5R UptbAprCJb4jIflXeQiL+AQ4yYPnX/b/NhtE4NHm6BO9/uLlUqCtIGK22uTxR+sSutdLyMUz1EaW9 Um4nEz1wGA5r96k6Xf6+CyANZwz8tIm/UEMEfUWDuMus03+tshDykaF6bcPMaJ87e8wWEL/DmDBWq 9yCqG3W1eOcvA72u3onXVA==; Date: Sat, 25 May 2024 18:07:09 +0300 Message-Id: <86y17yx74y.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <7308511a-b031-44f9-8460-2b5d85739bcb@gutov.dev> (message from Dmitry Gutov on Sat, 25 May 2024 17:47:49 +0300) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> <86zfsex9mq.fsf@gnu.org> <7308511a-b031-44f9-8460-2b5d85739bcb@gutov.dev> X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > Date: Sat, 25 May 2024 17:47:49 +0300 > Cc: 71179@debbugs.gnu.org > From: Dmitry Gutov > > On 25/05/2024 17:13, Eli Zaretskii wrote: > > Anyway, I suggested an approach that should leave everyone happy. Why > > are we still arguing? > > New option has the usual problems: > > * What to call it. > * General proliferation of new options makes it harder to find each one. > * Several days of arguing whether we can make the new behavior the > default one. I already said that I'm okay with making the new behavior the default, provided that we document the way of getting back old behavior. The new option can be a defvar, from where I stand, if that makes things easier. Just don't make it an internal variable. From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 03:15:01 2024 Received: (at 71179) by debbugs.gnu.org; 26 May 2024 07:15:01 +0000 Received: from localhost ([127.0.0.1]:38240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB85t-0006OL-5Y for submit@debbugs.gnu.org; Sun, 26 May 2024 03:15:01 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:49673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB85q-0006Nx-U6 for 71179@debbugs.gnu.org; Sun, 26 May 2024 03:14:59 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 75B9620003; Sun, 26 May 2024 07:14:24 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files In-Reply-To: <2c4c0319-b16e-4912-9991-3f6ad5a035a0@gutov.dev> (Dmitry Gutov's message of "Sat, 25 May 2024 15:31:01 +0300") Organization: LINKOV.NET References: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> <2c4c0319-b16e-4912-9991-3f6ad5a035a0@gutov.dev> Date: Sun, 26 May 2024 09:50:36 +0300 Message-ID: <86r0dpdpir.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71179 Cc: Spencer Baugh , 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> A grep-find-template that doesn't include will indeed start seeing >> ignores based on grep-find-ignored-files in rgrep. But, such a user can >> just set grep-find-ignored-files to nil and then they'll stop seeing >> ignores again. > > Yeah, that sounds like a good enough solution for such cases. > > I recall that Juri experimented with customizing grep-find-template (to use > ripgrep? and perhaps other things). I wonder what he thinks about this > patch. I'm using such configuration for ripgrep that hopefully should continue working: (setq grep-find-template "find -type f -print0 | sort -z | xargs -0 -e rg -nH --no-heading --null -j8 --sort path -M 200 --max-columns-preview -e ") From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 08:48:31 2024 Received: (at 71179) by debbugs.gnu.org; 26 May 2024 12:48:31 +0000 Received: from localhost ([127.0.0.1]:38566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBDId-0000yk-HX for submit@debbugs.gnu.org; Sun, 26 May 2024 08:48:31 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:44013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBDIb-0000yT-2b for 71179@debbugs.gnu.org; Sun, 26 May 2024 08:48:30 -0400 From: Spencer Baugh To: Juri Linkov Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files In-Reply-To: <86r0dpdpir.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 26 May 2024 09:50:36 +0300") References: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> <2c4c0319-b16e-4912-9991-3f6ad5a035a0@gutov.dev> <86r0dpdpir.fsf@mail.linkov.net> Date: Sun, 26 May 2024 08:48:15 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716727695; bh=CaT/D93PkC+5CevIGNW7f9A4tSUyQt1RLa1xus+RpfU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=w+8jv8VudUIBFJFrphe4WE/wvSKShqVNvy7e8FulBQRsloSUWud+opmQY0BhvkdUd kATSKPGBITKZoDQdZuj3qBSHK4FjIPkhXaMvwJFZ57SCVjZLDiV9Uoi2joHZXMCpVY GN0wm5ANgzuGFFbvBs4LbL3u0a1S4C0lQUScyFY7Awe95L7feYWe0pH5aFKqs0EDe+ HD73PWo6ZXHw5AVGTSIvPSCO3fsPcs4WO2TZ0CMXfnZQpyqGD+su3WLwuIMmNwT11t MwhGnA5m0xF5EobB9nUWtVx8+5ak3Q79Ak8NBintyXfB141aVL56xKa/2SLo21P+pR byEzX19wkeRZQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: Dmitry Gutov , 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: >>> A grep-find-template that doesn't include will indeed start seeing >>> ignores based on grep-find-ignored-files in rgrep. But, such a user can >>> just set grep-find-ignored-files to nil and then they'll stop seeing >>> ignores again. >> >> Yeah, that sounds like a good enough solution for such cases. >> >> I recall that Juri experimented with customizing grep-find-template (to use >> ripgrep? and perhaps other things). I wonder what he thinks about this >> patch. > > I'm using such configuration for ripgrep that hopefully should continue working: > > (setq grep-find-template "find -type f -print0 | sort -z | xargs -0 -e rg -nH --no-heading --null -j8 --sort path -M 200 --max-columns-preview -e ") Yep, that would continue working - it has a totally normal "find" invocation and that's all this touches. From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 08:56:35 2024 Received: (at 71179) by debbugs.gnu.org; 26 May 2024 12:56:35 +0000 Received: from localhost ([127.0.0.1]:38576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBDQQ-0001AJ-V2 for submit@debbugs.gnu.org; Sun, 26 May 2024 08:56:35 -0400 Received: from wfhigh2-smtp.messagingengine.com ([64.147.123.153]:33383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBDQN-0001A1-Ez for 71179@debbugs.gnu.org; Sun, 26 May 2024 08:56:33 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 18F1318000C3; Sun, 26 May 2024 08:56:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 26 May 2024 08:56:17 -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=fm3; t=1716728176; x=1716814576; bh=cDW9xDQaejwT/Jmg2LIF2fUxnKfjSuGb1e14bPBFC+Y=; b= I4VciAhXf++08gv5+9BwL9Pfc1MF45/H9aDBUBT7JcNXPaMpKZnm1ghsMICiRZo4 +SF5FHC/DXOOlhSjYJTRBEuaO/2BE/MJYiHka6OD2xxFyUP7P+XJOtbHWAa+bkvk FDkTK0o8rgcDtM6vew7nctDfIKFUBHiMjIhItObcs3ml/nS22vdGGZwJsRe5Haa5 T8oEttFKao+OqkhxQQwB7jDTZG7RbWnCu2HwiYQHZUptGQ+lSy5ULuRwccbVGGfo Bj7cK9e+t3rGGExGuN+WUQbscKgVQIMnX6ULz8wDiwW5sLQpK+GFHOOf+yOfeGeo ntaPN81z8Q46Yt99DTrA7w== 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=1716728176; x= 1716814576; bh=cDW9xDQaejwT/Jmg2LIF2fUxnKfjSuGb1e14bPBFC+Y=; b=N 8pSYPqpldM4XU81J+vwNYHCa5PY1P9Gz/ycNjkR4PywH1loeyNcAyL9f0KfIpgxQ uIJteVlGmYPSMGxkR8bbAKsS66m3RRXyUEz5PK+OioqYvo3P8jHG87psUCEz5IYP 7kJ1JScmiWv3P2lNvhe9BKIX/maBrlBu3GnKM5zxtamc0MmaZHs68f2J7l/f7ZSn OkzejJUamkQqE+cFrw3rTWJvSn0rL5RxN7L3yYJXP6LLTfpSTI/JINgMa8NkHzIO 6d4/LQE24Epsv5DABVCnByJInjQDKfkqKIz1KuTtnCfOxD6dL5UVu4sGDT/tbj/o ybC5/VwNFVcqJJAoeXKfA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejvddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 May 2024 08:56:15 -0400 (EDT) Message-ID: <6921d9a4-af56-4457-9799-ee1fee8224a5@gutov.dev> Date: Sun, 26 May 2024 15:56:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Juri Linkov References: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> <2c4c0319-b16e-4912-9991-3f6ad5a035a0@gutov.dev> <86r0dpdpir.fsf@mail.linkov.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86r0dpdpir.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179 Cc: Spencer Baugh , 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 26/05/2024 09:50, Juri Linkov wrote: >>> A grep-find-template that doesn't include will indeed start seeing >>> ignores based on grep-find-ignored-files in rgrep. But, such a user can >>> just set grep-find-ignored-files to nil and then they'll stop seeing >>> ignores again. >> Yeah, that sounds like a good enough solution for such cases. >> >> I recall that Juri experimented with customizing grep-find-template (to use >> ripgrep? and perhaps other things). I wonder what he thinks about this >> patch. > I'm using such configuration for ripgrep that hopefully should continue working: > > (setq grep-find-template "find -type f -print0 | sort -z | xargs -0 -e rg -nH --no-heading --null -j8 --sort path -M 200 --max-columns-preview -e ") AFAICT it will continue to work fine. I think you can drop the 'sort -z' step, though: the sorting at the end of xref-matches-in-files covers the results' order, and adding a synchronizing step like this slows down the overall process a little (see bug#71094). From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 09:42:28 2024 Received: (at 71179) by debbugs.gnu.org; 26 May 2024 13:42:28 +0000 Received: from localhost ([127.0.0.1]:38597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBE8p-0002Vm-Ge for submit@debbugs.gnu.org; Sun, 26 May 2024 09:42:28 -0400 Received: from mxout6.mail.janestreet.com ([64.215.233.21]:48231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBE8m-0002VZ-J5 for 71179@debbugs.gnu.org; Sun, 26 May 2024 09:42:25 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files In-Reply-To: <86y17yx74y.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 May 2024 18:07:09 +0300") References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> <86zfsex9mq.fsf@gnu.org> <7308511a-b031-44f9-8460-2b5d85739bcb@gutov.dev> <86y17yx74y.fsf@gnu.org> Date: Sun, 26 May 2024 09:42:10 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716730930; bh=MErVRdkL5A44Tx6eS9Wrxab7r/rOlc7iSvOcZ6HV+dk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=O5m5ARxbLgaSUS5LHTEmXTc/PHBJguR/Kl3bBBnCIFaWXpTma8swSnyusY8PIPAHF 0KA8s2xsEqHFoG9era/ODg0afab2MrzBbtxY9sIfh12hWhxG663izyMJ4+/e2zFScL mijlvQ6xco8BhLSXOx6cS3ZrL3khpAlDfzNhDxaefvawBs/OM8ucN8tmh3mF3Gmfy7 lj5gcOqB5PMb9hIKUek7GM+pKxENjzOXcjqrUKbmPOC7Xju535ofC4Srwqmy/9vbej HoxkuzXYsxbs+hzD1Sb7vzALN8yoQEN4eWnQL70CDMf3tHoUeSYKPfOZ1eRVFKDI1c pqNuzANWYdC/Q== X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 71179 Cc: Dmitry Gutov , 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Date: Sat, 25 May 2024 17:47:49 +0300 >> Cc: 71179@debbugs.gnu.org >> From: Dmitry Gutov >> >> On 25/05/2024 17:13, Eli Zaretskii wrote: >> > Anyway, I suggested an approach that should leave everyone happy. Why >> > are we still arguing? >> >> New option has the usual problems: >> >> * What to call it. >> * General proliferation of new options makes it harder to find each one. >> * Several days of arguing whether we can make the new behavior the >> default one. > > I already said that I'm okay with making the new behavior the default, > provided that we document the way of getting back old behavior. > > The new option can be a defvar, from where I stand, if that makes > things easier. Just don't make it an internal variable. OK, here's the patch, now with an option. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-In-rgrep-check-matching-files-before-excluding-files.patch >From 231813e5825e1f3a63c24ad6063eb73de7b2b361 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 26 May 2024 09:26:09 -0400 Subject: [PATCH] In rgrep, check matching files before excluding files There are a lot of excluding globs, and checking them all is expensive. The files glob (i.e. the glob for files we actually want) is usually just one or two entries, so it's quite fast to check. If find checks the files glob first and then the excluding glob, it has to do much less checking (since the files glob will substantially narrow down the set of files on its own), and find performance is much better. In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/") from ~410ms to ~130ms. Further optimizations are possible now that the ignores and matched files are in the same argument which can be rearranged more easily without compatibility issues; I'll do those optimizations in later commits. * lisp/progmodes/grep.el (rgrep-find-ignores-in-): Add. * lisp/progmodes/grep.el (rgrep-default-command): Check rgrep-find-ignores-in- and move the excluded files glob to part of the "files" argument. --- lisp/progmodes/grep.el | 97 +++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index ce54c57aabc..c0b48fb17e0 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -214,6 +214,21 @@ grep-find-template :set #'grep-apply-setting :version "22.1") +(defvar rgrep-find-ignores-in- t + "If nil, when `rgrep' expands `grep-find-template', file ignores go in . + +By default, the placeholder contains find options for affecting the +directory list, and the placeholder contains the find options which +affect which files are matched, both `grep-find-ignored-files' and the +FILES argument to `rgrep'. + +This separation allows the two sources of file matching in to be +optimized together into a set of options which are overall faster for +\"find\" to evaluate. + +If nil, contains ignores both for directories and files, and +contains only the FILES argument. This is the old behavior.") + (defvar grep-quoting-style nil "Whether to use POSIX-like shell argument quoting.") @@ -1372,45 +1387,49 @@ rgrep-find-ignored-directories (defun rgrep-default-command (regexp files dir) "Compute the command for \\[rgrep] to use by default." - (require 'find-dired) ; for `find-name-arg' - (grep-expand-template - grep-find-template - regexp - (concat (shell-quote-argument "(" grep-quoting-style) - " " find-name-arg " " - (mapconcat - (lambda (x) (shell-quote-argument x grep-quoting-style)) - (split-string files) - (concat " -o " find-name-arg " ")) - " " - (shell-quote-argument ")" grep-quoting-style)) - dir - (concat - (when-let ((ignored-dirs (rgrep-find-ignored-directories dir))) - (concat "-type d " - (shell-quote-argument "(" grep-quoting-style) - ;; we should use shell-quote-argument here - " -path " - (mapconcat - (lambda (d) - (shell-quote-argument (concat "*/" d) grep-quoting-style)) - ignored-dirs - " -o -path ") - " " - (shell-quote-argument ")" grep-quoting-style) - " -prune -o ")) - (when-let ((ignored-files (grep-find-ignored-files dir))) - (concat (shell-quote-argument "!" grep-quoting-style) " -type d " - (shell-quote-argument "(" grep-quoting-style) - ;; we should use shell-quote-argument here - " -name " - (mapconcat - (lambda (ignore) (shell-quote-argument ignore grep-quoting-style)) - ignored-files - " -o -name ") - " " - (shell-quote-argument ")" grep-quoting-style) - " -prune -o "))))) + (require 'find-dired) ; for `find-name-arg' + (let ((ignored-files-arg + (when-let ((ignored-files (grep-find-ignored-files dir))) + (concat (shell-quote-argument "(" grep-quoting-style) + ;; we should use shell-quote-argument here + " -name " + (mapconcat + (lambda (ignore) (shell-quote-argument ignore grep-quoting-style)) + ignored-files + " -o -name ") + " " (shell-quote-argument ")" grep-quoting-style))))) + (grep-expand-template + grep-find-template + regexp + (concat (shell-quote-argument "(" grep-quoting-style) + " " find-name-arg " " + (mapconcat + (lambda (x) (shell-quote-argument x grep-quoting-style)) + (split-string files) + (concat " -o " find-name-arg " ")) + " " + (shell-quote-argument ")" grep-quoting-style) + (when (and rgrep-find-ignores-in- ignored-files-arg) + (concat " " (shell-quote-argument "!" grep-quoting-style) " " ignored-files-arg))) + dir + (concat + (when-let ((ignored-dirs (rgrep-find-ignored-directories dir))) + (concat "-type d " + (shell-quote-argument "(" grep-quoting-style) + ;; we should use shell-quote-argument here + " -path " + (mapconcat + (lambda (d) + (shell-quote-argument (concat "*/" d) grep-quoting-style)) + ignored-dirs + " -o -path ") + " " + (shell-quote-argument ")" grep-quoting-style) + " -prune -o ")) + (when (and (not rgrep-find-ignores-in-) ignored-files-arg) + (concat (shell-quote-argument "!" grep-quoting-style) " -type d " + ignored-files-arg + " -prune -o ")))))) (defun grep-find-toggle-abbreviation () "Toggle showing the hidden part of rgrep/lgrep/zrgrep command line." -- 2.39.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 10:16:02 2024 Received: (at 71179) by debbugs.gnu.org; 1 Jun 2024 14:16:02 +0000 Received: from localhost ([127.0.0.1]:56977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDPWb-00072B-Vh for submit@debbugs.gnu.org; Sat, 01 Jun 2024 10:16:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDPWa-00071h-4X for 71179@debbugs.gnu.org; Sat, 01 Jun 2024 10:16:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDPWI-0002OB-J6; Sat, 01 Jun 2024 10:15:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uo/pRVugLJCbxztJCpd4PVi1X22gBCHlfPQNo/ZnbzQ=; b=emhI5WWTFnaL J/ZIrVcHi/1N7XdvzgFSyLOhscSveVZkKH/87aiOJdrZIV6CJJHr9NGR3iPpffgiBnq/LddZZkhne dj6Wq5VzHjH23p09izq30EYCuBk8JWPIgs5oHpVWhWLaTCg+iPWUBGROkRKEM9QchBz+8gLR/Anw/ Qt4XUBxx6UxeaTQAccDMD2q82FLNvheKQ4AilLjUMmxFrPG2eQ/XBcNtRaoYkPWqNl11ca3XLAetV 4qEiqz4qFUzJkjAGV26/g/BTh62nJb0RqsFDdv6q5NdF4V7hUhWnvH9IMPnoJFvyktzvDXoKCCcWS h/7DxuYeSby87EEF+m6QmA==; Date: Sat, 01 Jun 2024 17:15:39 +0300 Message-Id: <86sexwoik4.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Sun, 26 May 2024 09:42:10 -0400) Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> <86zfsex9mq.fsf@gnu.org> <7308511a-b031-44f9-8460-2b5d85739bcb@gutov.dev> <86y17yx74y.fsf@gnu.org> X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 71179 Cc: dmitry@gutov.dev, 71179@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > From: Spencer Baugh > Cc: Dmitry Gutov , 71179@debbugs.gnu.org > Date: Sun, 26 May 2024 09:42:10 -0400 > > > I already said that I'm okay with making the new behavior the default, > > provided that we document the way of getting back old behavior. > > > > The new option can be a defvar, from where I stand, if that makes > > things easier. Just don't make it an internal variable. > > OK, here's the patch, now with an option. Thanks, this LGTM. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 06:47:30 2024 Received: (at 71179-done) by debbugs.gnu.org; 2 Jun 2024 10:47:30 +0000 Received: from localhost ([127.0.0.1]:57932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDikM-0002nf-7y for submit@debbugs.gnu.org; Sun, 02 Jun 2024 06:47:30 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:47241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDikK-0002nT-Ir for 71179-done@debbugs.gnu.org; Sun, 02 Jun 2024 06:47:29 -0400 Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-57a32b0211aso2673907a12.2 for <71179-done@debbugs.gnu.org>; Sun, 02 Jun 2024 03:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717325170; x=1717929970; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=7R6BPrgjWTH58VsnaZw/wJkT+bRTCM14teSe6ylQ6Fk=; b=l3xsxzL2VjUDha0Zb4hOTo/wrmYbV0Rr2xma8Dkx7tdMXNk9cwOt8MC+PiNpdX9us3 cXYgty1IYfMDjzXDnFrShEbhvGIxF5Z0DAMKK//8xBXU0ahPdPiWSZgY655P7qwAeMA4 yDhNVEA4KVIsbaEH0sYtHdz3qGeQ8DDV7lCASKaCtpfsf98VwjYQFEXteME/7fQawCJe siYVU4CakxrFSs12gSZiMxazuFwm7nAE7PhE6oedL6X/qGbSzvp0siE7gFIskvj2+/hc bwgLVeUqAUpCt3exANWKY8StQ1noVoGCMAdxhoTFv5lUHSs1bnWPXS/RlaijJTEAl/eG I7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717325170; x=1717929970; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7R6BPrgjWTH58VsnaZw/wJkT+bRTCM14teSe6ylQ6Fk=; b=A3KEV9b0MNa7P1zEmtambfPwmBa+4v7ZfUIEmMl91FG2ryafoe7hPQm03nZKKbH5N4 zEdjQGRR57E+Rm+qVclTibrTxQb3fIqpw352tGPrkCAdJDssKzc6FrBSa9ldqGP0GioI YMWEsWq1yNZac7ra8SzvO54eh69I9XkY/p2Ojtn2xxnCSpumElKO4z98EhzAFvsoipvU +HEWXp7XYJYp/73qeyhcxCUddyi+1te8HfWQwxDksdKMJxEo/6V+fG7z5QoUjc4YZsiL 6E/BTZtywJVfUnBIpL0e8ezqdZOqBMXu3NyfqePgp3C2BvUYPQB/0SCCprHGcSPdF2eZ SdQw== X-Forwarded-Encrypted: i=1; AJvYcCWEQuMSax2DbF3txSCtuX/h0OVQDfr1b6XqMNt2xBtnttA8geR2vtpA21Ybu0/wbZtovY/BjO7oX2YfTbCJtQLKVsWdjVHz74ovFA== X-Gm-Message-State: AOJu0YwX/JHu3lEU/hmYoosuu3zlf/5W7HqiP1kpIlM8BQPz3SshltX/ A4KnnpHKNYHkGWw0syVwwH2iL9HTeTjdmVyapLoki8Q28kol0C3cnY8xTdlG+bq8c2mPY87KZr2 XQIwzyDL8Y6ZtXlTwBWEblzFEOFo= X-Google-Smtp-Source: AGHT+IEug8dV/tJZUtNGLWd3ixo7xCMUlz7JtrL93bdhLlc548TZEL0ttjPJ4VV1z8Gbh5TBqkJf7kdwI0F9CmT9GbI= X-Received: by 2002:a50:ab0a:0:b0:57a:1dea:f077 with SMTP id 4fb4d7f45d1cf-57a363dd0aemr3548342a12.13.1717325170044; Sun, 02 Jun 2024 03:46:10 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 2 Jun 2024 03:46:09 -0700 From: Stefan Kangas In-Reply-To: <86sexwoik4.fsf@gnu.org> References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> <861q5qyoz4.fsf@gnu.org> <86zfsex9mq.fsf@gnu.org> <7308511a-b031-44f9-8460-2b5d85739bcb@gutov.dev> <86y17yx74y.fsf@gnu.org> <86sexwoik4.fsf@gnu.org> MIME-Version: 1.0 Date: Sun, 2 Jun 2024 03:46:09 -0700 Message-ID: Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files To: Eli Zaretskii , Spencer Baugh Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71179-done Cc: dmitry@gutov.dev, 71179-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 30.1 Eli Zaretskii writes: > Thanks, this LGTM. Same here, so pushed to master as commit b71fa27987d and closing the bug. Thanks, Spencer. From unknown Sat Aug 09 15:53:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Jun 2024 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator