Re: [whatwg/streams] WritableStreamDefaultWriterGetDesiredSize(writer) cannot in general be used to determine size of chunks read by pipeTo (#938)

I think part of the problem is that we've got highWaterMark serving double-duty as controlling buffering and communicating optimal chunk size.

Choosing the chunk size at the head of the pipe in a way that doesn't require global knowledge of the rest of the pipe is hard. I've been thinking along the lines of a feature for advanced users that permits an underlying sink to specifically state what size of chunks it wants. Maybe in combination with a feature for TransformStream where you can specify a function that provides a (possibly approximate) back-mapping from sizes on the readable side to sizes on the writable side.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/938#issuecomment-411762589

Received on Thursday, 9 August 2018 13:46:07 UTC