-
Notifications
You must be signed in to change notification settings - Fork 537
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
Fetch highWaterMark #923
Comments
Can it be updated dynamically? E.g when the response is not cloned, then it can be |
I guess it could. |
But if it's only 64k I think we could just have it as a default. It's more relevant if we have something like > 128k. |
Performance-wise I don't think there's a difference.
I mean if the response is cloned, then every time it's consumed bit by bit increase the Example:
|
We need a "max" highWaterMark then. |
Ah. Then I think 1MB should be more than enough. |
I wonder if it is possible to implement a custom stream controller? @jasnell |
Take a look at https://www.npmjs.com/package/cloneable-readable on how I clone Node.js streams. In our world I did that by setting the highwaterMark of the clone, and then the pipe mechanism did the rest. |
This is unfortunately for web streams, not node streams. |
What should we use as highWaterMark for the fetch api? I think browsers usually have 1m+ while Node has ~16k. Should we try matching the browsers? I think this has some implications on functionality when using
Response.clone
.The text was updated successfully, but these errors were encountered: