mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-02-09 14:14:56 +02:00
Try to use memory maps more aggressively on Windows.
Some brief playing around suggests that it is faster. However, it's probably slower in a VM. Let's prioritize native users.
This commit is contained in:
parent
f462d092e7
commit
5a9883d27c
@ -131,7 +131,7 @@ Less common options:
|
||||
--mmap
|
||||
Search using memory maps when possible. This is enabled by default
|
||||
when ripgrep thinks it will be faster. (Note that mmap searching
|
||||
doesn't current support the various context related options.)
|
||||
doesn't currently support the various context related options.)
|
||||
|
||||
--no-mmap
|
||||
Never use memory maps, even when they might be faster.
|
||||
@ -273,6 +273,9 @@ impl RawArgs {
|
||||
false
|
||||
} else if self.flag_mmap {
|
||||
true
|
||||
} else if cfg!(windows) {
|
||||
// On Windows, memory maps appear faster than read calls. Neat.
|
||||
true
|
||||
} else {
|
||||
// If we're only searching a few paths and all of them are
|
||||
// files, then memory maps are probably faster.
|
||||
|
Loading…
x
Reference in New Issue
Block a user