Increasing RipGrep speed for parsing large content size of various binary and text files #2507
-
First of all, thank you for this great tool! I am currently conducting a research. One of the key components of that research is utilizing RipGrep at the highest possible performance level in order to parse thru enormous content size of various binary and text files. My current command is: That performance test runs against a directory slightly less than 4 GB filled with various data and types. On average it completes in under 50 seconds. I assume utilization of pre-processors for some file types can help speed it up. Would raising the amount of threads help in this situation? Or RG already uses the best and optimal amount of threads automatically? For further research, I plan to run RG on a base Operating System as I noticed that some virtualized systems underperform due to VM software peculiarities. That new system will have elevated power specifications and I would like to make sure that I squeeze the best performance out of it while using RG. Would you be able to help me and suggest if there are any best use combinations in order to increase speed, please? Thank you! Sincerely, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'll do my best to help, but I think there is a really important thing to The key thing to realize is that there are many variables that influence
For benchmarking, I would just make sure that I would generally expect best performance on native hardware, not virtualized.
Here's one example of me hand-waving but providing a concrete guess as to the
In this case, I would generally expect you to saturated the bandwidth of your In contrast, if your query was, say, I'd expect something like See how the specific query (and haystack) matters? It really matters. And the What this means is that some part of my advice to you is essentially "use
Maybe. Hard to say without specifics. But you should be able to test this in
ripgrep cannot know a priori what the optimal number of threads is for every But this is a good example of a question where I'd say: why are you asking?
Without being able to fully explain it, I would say:
With that said, there are some really critical aspects of your problem that
It may very well be the case, for example, that you would be better served by |
Beta Was this translation helpful? Give feedback.
I'll do my best to help, but I think there is a really important thing to
understand first: without a real world reproduction that I can myself run and
experiment with, the best I can do is wave my hands and make wild guesses.
The key thing to realize is that there are many variables that influence
ripgrep's performance, and it's quite literally impossible for you to
characterize all of them. For example, searching the sing…