[whatwg/streams] Tests for optimised implementations of piping (#659)

This is arguably a Chromium issue but since the tests will arrive at Chromium via the the w3c web-platform-tests I am filing it here. It will be useful for any implementers that need to optimise pipes.

This is loosely related to #359.

Ideas:

- [ ] Very long pipes (to make the test run in a practical amount of time, we can probably only go up to about 1000 transforms).
- [ ] Tests that the three types of identity transform (undefined transformer, transformer with no transform() method, transformer with pass-through transform() method) make no difference when inserted into a pipeline.
- [ ] Test that a transformer with a transform() method that comes and goes works correctly in a pipe. Specifically, any chunk which enters the writable side provably after the transform() method is added must be transformed. Similarly, any chunk which enters the writable size after transformer.transform is undefined must not be transformed.
- [ ] Similarly, test that a transform property that goes from undefined -> invalid errors the stream at the right time.
- [ ] Verify that an identity transform with a large queue in the middle of a pipe causes the pipe to have that much capacity.
- [ ] Maybe verify that a pipe has "not too much more" capacity than the sum of the HWM implies? I'm not sure about this one. Particularly for byte streams that go between processes, it would be nice to able to pass them through some lower-level API without worrying too much about how much extra buffering that adds.
- [ ] Rearranging pipelines (use exploding TransformStreams + preventAbort + preventCancel to break pipes into smaller pipes, then put them back together in a different order with pipeTo).

-- 
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/659

Received on Wednesday, 18 January 2017 07:48:09 UTC