- From: Andy Edwards <notifications@github.com>
- Date: Thu, 13 Mar 2025 18:22:27 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 14 March 2025 01:22:31 UTC
jedwards1211 left a comment (whatwg/streams#1323) @MattiasBuelens I wonder if I'm missing something here... In a `ReadableStream` we can handle backpressure by limiting the amount of data we enqueue in `pull()` according to `controller.desiredSize`. But it seems like in a `TransformStream` we can't really put `controller.desiredSize` to good use. Our `transform()` could limit the amount of data it enqueues, but any of the remaining data from the input chunk would just be lost. So can we make any reasonable decisions with `TransformStreamDefaultController.desiredSize`? Theoretically, there should be a clean way to implement a `TransformStream` where given an input chunk `{ n: 483 }`, it enqueues 483 output chunks, respecting backpressure. But it seems impossible to do something like that within the API's current limitations. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1323#issuecomment-2723092784 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/streams/issues/1323/2723092784@github.com>
Received on Friday, 14 March 2025 01:22:31 UTC