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

Tests for optimised implementations of piping #659

Open
7 tasks
ricea opened this issue Jan 18, 2017 · 0 comments
Open
7 tasks

Tests for optimised implementations of piping #659

ricea opened this issue Jan 18, 2017 · 0 comments
Labels

Comments

@ricea
Copy link
Collaborator

ricea commented Jan 18, 2017

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).
@ricea ricea added the piping label Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant