Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set DelimitedFiles.readdlm use_mmap default to false for all OSes #40415

Merged
merged 6 commits into from
Apr 19, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions stdlib/DelimitedFiles/src/DelimitedFiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ Specifying `skipstart` will ignore the corresponding number of initial lines fro
If `skipblanks` is `true`, blank lines in the input will be ignored.

If `use_mmap` is `true`, the file specified by `source` is memory mapped for potential
speedups. Default is `true` except on Windows. On Windows, you may want to specify `true` if
the file is large, and is only read once and not written to.
speedups if the file is large. Default is `false'. On a Windows filesystem, `use_mmap` should not be set
to `true` unless the file is only read once and is also not written to.
Some edge cases exist where an OS is Unix-like but the filesystem is Windows-like.

If `quotes` is `true`, columns enclosed within double-quote (\") characters are allowed to
contain new lines and column delimiters. Double-quote characters within a quoted field must
Expand Down Expand Up @@ -232,7 +233,7 @@ readdlm_auto(input::IO, dlm::AbstractChar, T::Type, eol::AbstractChar, auto::Boo
function readdlm_auto(input::AbstractString, dlm::AbstractChar, T::Type, eol::AbstractChar, auto::Bool; opts...)
isfile(input) || throw(ArgumentError("Cannot open \'$input\': not a file"))
optsd = val_opts(opts)
use_mmap = get(optsd, :use_mmap, Sys.iswindows() ? false : true)
use_mmap = get(optsd, :use_mmap, false)
fsz = filesize(input)
if use_mmap && fsz > 0 && fsz < typemax(Int)
a = open(input, "r") do f
Expand Down