4 ms·
> I'm sure there are some cases where the performance difference comes down to skipping more or fewer files My use case if probably weird, various times I grep
by bkor 6y ago
> I'm sure there are some cases where the performance difference comes down to skipping more or fewer files
My use case if probably weird, various times I grep for things across about 13k of full rpm package checkouts. So 13k directories, each with their .svn directory, one or more tarballs, possibly some patches/scripts, plus a spec file. I used to specifically tell GNU grep what to search for (grep something /SPECS/.spec), partly to avoid getting too many unwanted matches. Ripgrep is smart and quick enough to not need anything special. I like ugrep because sometimes it's needed to check the sources as well. Total size is 50-70GB, the spec files make up a tiny bit of that.
The distribution recently added a daily updated tarball with just the specs (7 or 20MB compressed depending if the .svn is in there). I'm planning to switch over to that. I'll spare you the details for why it's more difficult than it seems.
Thanks for the -p advice!
- burntsushi 6y agoGotya, thanks for elaborating! In case you didn't know about it, there is also ripgrep-all, which uses ripgrep internally, but can also search oodles of non-plain-text files, including tarballs: https://github.com/phiresky/ripgrep-all https://github.com/phiresky/ripgrep-all