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

Change the default highWaterMark for readableStrategy to 0 #808

Merged

Conversation

ricea
Copy link
Collaborator

@ricea ricea commented Sep 25, 2017

The reduces "buffer bloat" in pipes. The most significant change is that
now be default transform() is called until something is read. In normal
use, TransformStream will be used in a pipe and a transform() will be
triggered immediately to fill the queue in the following writable. So the
difference from the point of view of everyday use is minimal.

If the highWaterMark passed to the TransformStream constructor is
undefined (or not present) it will be changed to zero before passing it
on to the ReadableStream constructor.

Some tests assumed that transform() would be called without anything
being read and so have been fixed. In most cases the tests were fixed by
supplying an explicit highWaterMark to the constructor.

Verify that default strategies have the expected values.

Closes #777.

The reduces "buffer bloat" in pipes. The most significant change is that
now be default transform() is called until something is read. In normal
use, TransformStream will be used in a pipe and a transform() will be
triggered immediately to fill the queue in the following writable. So the
difference from the point of view of everyday use is minimal.

If the highWaterMark passed to the TransformStream constructor is
undefined (or not present) it will be changed to zero before passing it
on to the ReadableStream constructor.

Some tests assumed that transform() would be called without anything
being read and so have been fixed. In most cases the tests were fixed by
supplying an explicit highWaterMark to the constructor.

Verify that default strategies have the expected values.

Closes whatwg#777.
The test "abort should set the close reason for the writable when it
happens before cancel during underlying sink write, but cancel should
still succeed" was setting the highWaterMark for the writable when it
should have been setting it for the readable. Fix it.
ES6 defaulting syntax can do it directly.
@domenic domenic merged commit fd17cf0 into whatwg:master Sep 26, 2017
@ricea ricea deleted the transform-stream-default-readable-hwm-zero branch September 27, 2017 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Change default readableStrategy HWM to 0?
2 participants