1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +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:
Andrew Gallant 2016-09-24 20:46:20 -04:00
parent 6b2efd4d88
commit a44735aa87

View File

@ -292,6 +292,9 @@ impl RawArgs {
} else if cfg!(windows) {
// On Windows, memory maps appear faster than read calls. Neat.
true
} else if cfg!(darwin) {
// On Mac, memory maps appear to suck. Neat.
false
} else {
// If we're only searching a few paths and all of them are
// files, then memory maps are probably faster.