Skip to content

Drop the default buffer size to 8K - #32695

Merged
bors merged 1 commit into
rust-lang:masterfrom
sfackler:default-buf-size
Apr 8, 2016
Merged

Drop the default buffer size to 8K#32695
bors merged 1 commit into
rust-lang:masterfrom
sfackler:default-buf-size

Conversation

@sfackler

Copy link
Copy Markdown
Member

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

@sfacklersfackler added the T-libs-api [DEPRECATED; DO NOT USE] label Apr 3, 2016
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @alexcrichton

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

@sfackler

Copy link
Copy Markdown
MemberAuthor

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.
Closesrust-lang#31885
@alexcrichton

Copy link
Copy Markdown
Member

👍 from me

@sfackler

Copy link
Copy Markdown
MemberAuthor

@bors r=alexcrichton

cc @rust-lang/libs

@bors

bors commented Apr 7, 2016

Copy link
Copy Markdown
Collaborator

📌 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.
Closesrust-lang#31885
@bors

bors commented Apr 8, 2016

Copy link
Copy Markdown
Collaborator

⌛ 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:masterApr 8, 2016
@brsonbrson 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
Copy Markdown
Contributor

Why isn't this considered a breaking change?

@bluss

Copy link
Copy Markdown
Contributor

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

@Havvy

Copy link
Copy Markdown
Contributor

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

@sfackler

Copy link
Copy Markdown
MemberAuthor

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@sfackler@rust-highfive@alexcrichton@bors@Havvy@bluss@brson