Subject: bug#71094: [PATCH] Prefer to run find and grep in parallel in rgrep

From: Dmitry Gutov <[email-masked]>
Date: Thu, 23 May 2024 16:24:11 +0300

On 23/05/2024 07:46, Eli Zaretskii wrote:
>> From: Manuel Giraud<[email-masked]>
>> Cc:[email-masked],[email-masked],[email-masked],
>>    [email-masked]
>> Date: Wed, 22 May 2024 21:15:02 +0200
>>
>> Eli Zaretskii<[email-masked]>  writes:
>>
>> [...]
>>
>>> Thanks, but we need the timings of the corresponding Emacs commands,
>>> not the commands run from the shell prompt.
>> Ok.  What are those commands and how to timed them?
> It's rgrep, AFAIU, according to the original report in this bug's
> discussion.  Dmitry, would you please show Manual the commands you
> were running in your benchmarks?

1. Visit a directory with a fair number of files.
2. M-x rgrep, enter some odd regexp like "asdfasf@!#!" and "*" for the 
files wildcard.
3. Perform the search. Look at the end of the *grep* output, it will say 
something like "duration: 4.52 s". Note the number.

And you could repeat the same after applying the patch, recompiling 
Emacs (or at least grep.el) and restarting.

Preferably do the scenario 2-3 times to ensure that the filesystem cache 
is warm, and cold file access speed doesn't skew the numbers.