-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
stream: suggestion stream._writeMany #29034
Comments
|
True, but by exposing it we enable some optimizations that are otherwise not possible. |
We would still need to validate that the value for |
I'm not sure I follow? |
Currently the
stream.writev
API has two drawbacks:allBuffers
).It would be nice if user space could just create the correctly formatted array without having to perform any allocations, copies and transformations.
In order to not break anything I suggest a new signature
writev
maybe calledwriteMany
?Which would look something like:
e.g.
Looking at the current
Writable
implementation, thewritev
scenario will always create two "unnecessary" array copies in order to pass the chunks. Furthermore all the array entries are allocated objects.The text was updated successfully, but these errors were encountered: