-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Faster Transform
stream
#33397
Comments
Thoughts @nodejs/streams? |
How much will we gain from this? I'm +1, possibly with a better name. |
@mcollina: ~60% $ time node fast-transform.js
real 0m1.582s
user 0m1.737s
sys 0m0.157s
$ time node transform.js
real 0m2.671s
user 0m2.683s
sys 0m0.069s
undici$
|
How does it compare to transforming with an async generator function? |
A faster version of Transform which avoids the Writable overhead. Refs: nodejs#33397
So using an async generator in |
|
Apparently I should be using |
Some thoughts on how to make
Transform
streams faster.Part of the overhead of
Transform
(andPassThrough
) is that it is actually 2 streams, oneWritable
and oneReadable
, both with buffering and state management, which are connected together.We could try to skip this and implement
Transform
as aReadable
which implements theWritable
interface and proxies the naming.e.g.
Making this fully backwards compatible with
Transform
might be difficult.The text was updated successfully, but these errors were encountered: