From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71179: [PATCH] In rgrep, check matching files before excluding files Date: Sat, 25 May 2024 15:51:13 +0300 Message-ID: <864jamyrzy.fsf@gnu.org> References: <86jzji1jpe.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20444"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 71179@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 25 14:52:15 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sAqsh-00057r-JW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 May 2024 14:52:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAqsP-0004Un-5Y; Sat, 25 May 2024 08:51:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAqsN-0004Sh-0U for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 08:51:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAqsM-0003IZ-OP for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 08:51:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAqsU-0002uf-7L for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 08:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2024 12:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71179-submit@debbugs.gnu.org id=B71179.171664149111177 (code B ref 71179); Sat, 25 May 2024 12:52:02 +0000 Original-Received: (at 71179) by debbugs.gnu.org; 25 May 2024 12:51:31 +0000 Original-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 Original-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 Original-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==; In-Reply-To: (message from Dmitry Gutov on Sat, 25 May 2024 15:26:56 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285867 Archived-At: > 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?