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

add lock option to open to disable locking #35426

Merged
merged 1 commit into from
Apr 18, 2020
Merged

Conversation

JeffBezanson
Copy link
Sponsor Member

For #34195.

Tried reading a 240mb file a byte at a time:
julia 1.0: 1.82 sec
julia 1.4: 19 sec
this PR, lock=false: 2.6 sec

@JeffBezanson JeffBezanson added performance Must go faster domain:io Involving the I/O subsystem: libuv, read, write, etc. domain:multithreading Base.Threads and related functionality labels Apr 10, 2020
@@ -16,8 +16,9 @@ mutable struct IOStream <: IO
name::AbstractString
mark::Int64
lock::ReentrantLock
_dolock::Bool
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the underscore? Is this field somehow more private than others?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just me getting increasingly paranoid :)

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's almost as if we need a way to actually prevent people from messing with private internals 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:io Involving the I/O subsystem: libuv, read, write, etc. domain:multithreading Base.Threads and related functionality performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants