mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-04-14 00:58:43 +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
|
--mmap
|
||||||
Search using memory maps when possible. This is enabled by default
|
Search using memory maps when possible. This is enabled by default
|
||||||
when ripgrep thinks it will be faster. (Note that mmap searching
|
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
|
--no-mmap
|
||||||
Never use memory maps, even when they might be faster.
|
Never use memory maps, even when they might be faster.
|
||||||
@ -273,6 +273,9 @@ impl RawArgs {
|
|||||||
false
|
false
|
||||||
} else if self.flag_mmap {
|
} else if self.flag_mmap {
|
||||||
true
|
true
|
||||||
|
} else if cfg!(windows) {
|
||||||
|
// On Windows, memory maps appear faster than read calls. Neat.
|
||||||
|
true
|
||||||
} else {
|
} else {
|
||||||
// If we're only searching a few paths and all of them are
|
// If we're only searching a few paths and all of them are
|
||||||
// files, then memory maps are probably faster.
|
// files, then memory maps are probably faster.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user