-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
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
bcb76ab
to
8128817
Compare
👍 from me |
@bors r=alexcrichton cc @rust-lang/libs |
📌 Commit 8128817 has been approved by |
…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
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
Why isn't this considered a breaking change? |
What kind of program would it break? I'm curious. |
I'm not quite sure. Which is why I asked. |
We have never documented the default buffer size, so basically https://xkcd.com/1172/ |
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