Subject: bug#60506: parallel grep

From: "David G. Pickett" <[email-masked]>
Date: Sun, 8 Jan 2023 04:33:40 +0000 (UTC)

I recommend cscope for source file analysis.

-----Original Message-----
From: Eike Dierks <[email-masked]>
To: [email-masked]
Sent: Fri, Jan 6, 2023 7:40 pm
Subject: bug#60506: parallel grep

I was thinking about this again.
It looked easy at first, but it is not.

My prime use would be to grep in /usr/include
That would search a lot of files, but only return a few results.
In that case, searching a lot of files in parallel could be beneficial.

But it gets a lot more troublesome,
if you get a lot of results from a single file.
In that case a lot of results would need to be buffered,
so as to give them the very same ordering of the results.
Because the output of grep should always stay stable.

But we could make this explicit:
We could introduce a new option: --parallel (-P)
That would not have any order of the results returned.

I know, that we have to be very conservative about how grep works.
Actually a wrapper with gnu-parallel could do.

I want the grep to make my machine to scream and go.
I want to have grep to use all io and all compute,
and to return results as fast as it can get.

// hi at the grep
// eike