mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-04 21:52:54 +02:00
Tweak memory maps on darwin.
Namely, don't automatically pick memory maps on darwin, ever. They appear slower than standard read calls. Closes #36.
This commit is contained in:
@ -292,6 +292,9 @@ impl RawArgs {
|
|||||||
} else if cfg!(windows) {
|
} else if cfg!(windows) {
|
||||||
// On Windows, memory maps appear faster than read calls. Neat.
|
// On Windows, memory maps appear faster than read calls. Neat.
|
||||||
true
|
true
|
||||||
|
} else if cfg!(darwin) {
|
||||||
|
// On Mac, memory maps appear to suck. Neat.
|
||||||
|
false
|
||||||
} 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.
|
||||||
|
Reference in New Issue
Block a user