-
Notifications
You must be signed in to change notification settings - Fork 7
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
Merge HTTP chunks during chunked encoding #57
Comments
@mcollina @targos |
@ronag |
You could try to skip the socket cork/uncork and instead have your own buffer for the chunks that you then write in |
@ronag I don't know if my last PR was incorrect in someway but I couldn't find it. |
@gjgmenendez I think your link is incorrect. I assume you wanted to link to your PR? |
Refs: nodejs/performance#57 PR-URL: #50167 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: nodejs/performance#57 PR-URL: nodejs#50167 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Refs: nodejs/performance#57 PR-URL: nodejs#50167 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Given the code below, we cork the socket, but still, we always add chunked encoding data to each chunk buffered instead of just the actual buffer sent during uncork.
We should move the chunked encoding data insertion to
connectionCorkNT
somehow and avoid a lot of unnecessary overhead.What happens today is something like:
What we would like to achieve is:
We can achieve this by not writing the len before each chunk while corked. Instead, we can
unshift
the sum of all buffered chunks before we uncork.The text was updated successfully, but these errors were encountered: