Skip to content
Discussion options

You must be logged in to vote

Your flags are already in good shape, so a few of these are "you're fine, stop worrying." Going in order:

Q1 (mmap): --no-mmap is a no-op in your commands. ripgrep only memory-maps when it's searching a single file you name directly. The moment you point it at a directory it switches to parallel traversal and doesn't mmap at all, so there's nothing to turn off. You can drop --no-mmap from every one of these. mmap only enters the picture for single large files, which isn't your workload.

Q2 (cap bytes per file): there's no "read at most N bytes then give up" flag. -m 1 is the right tool and it's already doing the work: it stops the file as soon as it hits the first match. Since KEY: sits ~…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hsntgm
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants