-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
http: explain the unused argument in IncomingMessage._read #37275
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
http: explain the unused argument in IncomingMessage._read #37275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Note to whoever lands this: there's a typo in the commit message that needs fixing (ImcomingMessage
-> IncomingMessage
).
cc @nodejs/http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for performance reason. This adds an additional frame in a very hot code path.
See also: https://bugs.chromium.org/p/v8/issues/detail?id=10201
I'm -1 (strongly). This might be removed in the future.
@mcollina Thank you for giving the underlying performance consideration here. By giving that, this refactor should not be merged certainly. Should we add a comment here to explain the unused parameter? |
Yes please! |
00ec72b
to
3bc6cfa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
FWIW this might not be a problem anymore after v8 8.9 https://v8.dev/blog/v8-release-89 |
@ronag It' awesome. I added a NOTE comment as remind of the posiblity of improvement when v8 engine is upgraded to v8.9 in the future. |
The failures seem related to memory exhaustion during compilation, or nothing related to these changes anyway. I am going to land this. |
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Landed in ad3ebed...9d2125e |
@dnlup should the commits be squashed into a single commit before landing? The commits seem to be addressing the same task of throwing light on the unused argument. |
@RaisinTen I have seen landing both multiple commits and squashed commits in other PRs. In this case, I thought keeping the last two commits would have given a bit more context (perhaps making a mistake?) |
@RaisinTen I see. It makes sense. However, maybe squashing now would be too much hassle? (Reverting then landing again, I guess). Thanks for pointing that out, though. |
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
It removes parameter
n
ofIncomingMessage
since it is not used in the function body.