GNU bug report logs -
#71179
[PATCH] In rgrep, check matching files before excluding files
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Fri, 24 May 2024 20:15:02 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 71179 <at> debbugs.gnu.org (full text, mbox):
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 <F> 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 <X> at all?
This bug report was last modified 1 year and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.