Advice for allocations when handling very large files #2244
-
I'm aware that ripgrep has set memory limits that can cause problems, and that has been encountered while trying to perform the following operation:
Where the source is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Umm... I don't know. And literally can't know without seeing Also, unless source.txt is just a simple list of literals (which seems likely given the -F flag) you're probably going to have a bad time with 8MB of regexes. ripgrep is likely not sophisticated enough to handle it well. It might work with sufficient limits, but it really depends on your data. In theory, given -F, this invocation should just use Aho-Corasick and not a regex engine at all. In which case, I believe the size limits shouldn't apply. But again, without sharing the inputs here, it's hard to say. |
Beta Was this translation helpful? Give feedback.
Umm... I don't know. And literally can't know without seeing
source.txt
. Why not try some limits and experiment with it? Even given my knowledge, that's what I would do.Also, unless source.txt is just a simple list of literals (which seems likely given the -F flag) you're probably going to have a bad time with 8MB of regexes. ripgrep is likely not sophisticated enough to handle it well. It might work with sufficient limits, but it really depends on your data.
In theory, given -F, this invocation should just use Aho-Corasick and not a regex engine at all. In which case, I believe the size limits shouldn't apply.
But again, without sharing the inputs here, it's hard to say.