1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00

Get rid of special mmap decision on Windows.

I spent some quality time on my Windows 10 laptop and it appears to
suffer from a similar trade-off as on Linux: mmaps are bad for large
directory traversals but good for single large files.

Darwin continues to reject memory maps in all cases (unless explicitly
requested), but more testing should be done there.
This commit is contained in:
Andrew Gallant 2016-11-20 15:32:50 -05:00
parent 9598331fa8
commit d06f84ced3

View File

@ -504,9 +504,6 @@ impl<'a> ArgMatches<'a> {
false
} else if self.is_present("mmap") {
true
} else if cfg!(windows) {
// On Windows, memory maps appear faster than read calls. Neat.
true
} else if cfg!(target_os = "macos") {
// On Mac, memory maps appear to suck. Neat.
false