Skip to content

Avoid double file buffering#13780

Merged
straight-shoota merged 7 commits into
crystal-lang:masterfrom
carlhoerberg:avoid-double-file-buffering
Sep 22, 2023
Merged

Avoid double file buffering#13780
straight-shoota merged 7 commits into
crystal-lang:masterfrom
carlhoerberg:avoid-double-file-buffering

Conversation

@carlhoerberg

Copy link
Copy Markdown
Contributor

Avoid allocating file buffers when not needed.


urandom.close_on_exec = true
urandom.sync = true # don't buffer bytes
urandom.read_buffering = false # don't buffer bytes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For context: sync controls write buffering, which is completely irrelevant here. read_buffering is used to control read buffering.

Comment thread src/digest/digest.cr
Comment thread src/file.cr Outdated
@straight-shoota straight-shoota added this to the 1.10.0 milestone Sep 20, 2023
@straight-shoota
straight-shoota merged commit 4099c7f into crystal-lang:master Sep 22, 2023
Blacksmoke16 pushed a commit to Blacksmoke16/crystal that referenced this pull request Dec 11, 2023
Co-authored-by: Johannes Müller <straightshoota@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants