-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
http: defer reentrant execution of Parser::Execute #43369
Conversation
Review requested:
|
Good work! |
The problematic My suggestion: remove I speculate the hit won't be so bad, and can probably be fixed by doing the bookkeeping in JS land. |
@bnoordhuis Are you suggesting to remove that just in |
That threading through isn't necessary. Just set Node can short-circuit and pass data directly from libuv to the callback without going through
If I had infinite free time, I'd rewrite the parser to get rid of C++ -> JS callbacks and just return parse info. It'd get rid of so much complexity and inefficiency. |
Actually I was able to remove the
Do you see any problem in this? |
@addaleax @bnoordhuis I've sent my latest version which removes |
97fbe67
to
5c2884b
Compare
@bnoordhuis I applied your changes (plus few additional required changes). How does it look now? |
Is there a reason you didn't update lib/_http_common.js? You don't need to slice anymore, or pass the start and len arguments. |
@bnoordhuis The answer is obvious: I forgot. X°°°D Done now! |
50144ba
to
09ab6d2
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.
Nice, good work!
@addaleax I'll go ahead and dismiss your review. Looks like all actionable feedback's been addressed.
Done! |
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
wow, when a PR fixes a bug and reduces code, it's doing something right.
Thanks sir :) |
9ed0989
to
7a827ed
Compare
@nodejs/http Can anybody reapprove this so I can land it? |
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
Landed in b970634 |
PR-URL: #43369 Fixes: #39671 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs#43369 Fixes: nodejs#39671 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Hello @ShogunPanda Thanks for your work ! |
@j-catania It was merged in |
Is there a way to help see this backported to 16.x? This bug is really biting us as we are doing file uploads, and the 18 LTS release is still ~4 months off so upgrading isn't an option for us, and that we expect surrounding infra will take a few months to add 18 support after it releases. |
@nodejs/tsc Can we do this? What is the policy about backporting? |
node/doc/contributing/backporting-to-release-lines.md Lines 19 to 25 in 7bf50bc
|
Standard policy is:
|
Thanks both. |
If the commit lands cleanly on node/doc/contributing/backporting-to-release-lines.md Lines 11 to 17 in 7bf50bc
If a backport PR is necessary, you don't need to wait two weeks for opening it, but the LTS team won't land it until it's been on a Current version for at least two weeks. |
I see. |
No, someone from |
PR-URL: #43369 Fixes: #39671 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
PR-URL: #43369 Fixes: #39671 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs/node#43369 Fixes: nodejs/node#39671 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
This PR fixes an edge case in which
Parser::Execute
is called within the callback of one of its events.Fixes: #39671