Closed hoelzro closed 5 years ago
For the mmap route, Sys::Mmap
and File::Map
seem to be popular choices.
There will probably be no more releases of ack 2. If this is still a relevant idea, please submit it to the ack3 repo at https://github.com/beyondgrep/ack3.
In some (fairly) recent changes to ack since 2.14, I created an optimization by reading in a file in its entirely and calling the regex engine on that giant blob instead of applying the regex line by line. This is great, as it results in a giant speed boost. What's not so great is when ack mistakenly starts searching a huge file that consumes all memory on the machine. So there are a few ways we can get around this: