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

Drop the default buffer size to 8K #32695

Merged
merged 1 commit into from
Apr 8, 2016
Merged

Conversation

sfackler
Copy link
Member

@sfackler sfackler commented Apr 3, 2016

The 64k capacity was picked by me a couple of years ago in the initial
implementation of buffered IO adaptors:
https://github.com/rust-lang/rust/pull/9091/files#diff-b131eeef531ad098b32f49695a031008R62.
64K was picked for symmetry with libuv, which we no longer use.

64K is way larger than the default size of any other language that I
can find. C, C++, and Java default to 8K, and Go defaults to 4K. There
have been a variety of issues filed relating to this such as #31885.

Closes #31885

@sfackler sfackler added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 3, 2016
@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@sfackler
Copy link
Member Author

sfackler commented Apr 3, 2016

Should probably be discussed at libs triage.

The 64k capacity was picked by me a couple of years ago in the initial
implementation of buffered IO adaptors:
https://github.com/rust-lang/rust/pull/9091/files#diff-b131eeef531ad098b32f49695a031008R62.
64K was picked for symmetry with libuv, which we no longer use.

64K is *way* larger than the default size of any other language that I
can find. C, C++, and Java default to 8K, and Go defaults to 4K. There
have been a variety of issues filed relating to this such as rust-lang#31885.

Closes rust-lang#31885
@alexcrichton
Copy link
Member

👍 from me

@sfackler
Copy link
Member Author

sfackler commented Apr 7, 2016

@bors r=alexcrichton

cc @rust-lang/libs

@bors
Copy link
Contributor

bors commented Apr 7, 2016

📌 Commit 8128817 has been approved by alexcrichton

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 8, 2016
…ichton

 The 64k capacity was picked by me a couple of years ago in the initial
implementation of buffered IO adaptors:
https://github.com/rust-lang/rust/pull/9091/files#diff-b131eeef531ad098b32f49695a031008R62.
64K was picked for symmetry with libuv, which we no longer use.

64K is *way* larger than the default size of any other language that I
can find. C, C++, and Java default to 8K, and Go defaults to 4K. There
have been a variety of issues filed relating to this such as rust-lang#31885.

Closes rust-lang#31885
@bors
Copy link
Contributor

bors commented Apr 8, 2016

⌛ Testing commit 8128817 with merge 8694b4f...

bors added a commit that referenced this pull request Apr 8, 2016
Drop the default buffer size to 8K

The 64k capacity was picked by me a couple of years ago in the initial
implementation of buffered IO adaptors:
https://github.com/rust-lang/rust/pull/9091/files#diff-b131eeef531ad098b32f49695a031008R62.
64K was picked for symmetry with libuv, which we no longer use.

64K is *way* larger than the default size of any other language that I
can find. C, C++, and Java default to 8K, and Go defaults to 4K. There
have been a variety of issues filed relating to this such as #31885.

Closes #31885
@bors bors merged commit 8128817 into rust-lang:master Apr 8, 2016
@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Apr 11, 2016
@sfackler sfackler deleted the default-buf-size branch April 11, 2016 20:38
@Havvy
Copy link
Contributor

Havvy commented Apr 12, 2016

Why isn't this considered a breaking change?

@bluss
Copy link
Member

bluss commented Apr 12, 2016

What kind of program would it break? I'm curious.

@Havvy
Copy link
Contributor

Havvy commented Apr 13, 2016

I'm not quite sure. Which is why I asked.

@sfackler
Copy link
Member Author

We have never documented the default buffer size, so basically https://xkcd.com/1172/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants