Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
process: preserve AsyncLocalStorage on queueMicrotask only when needed#60913
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ae950e3 to a6615a8Comparea6615a8 to 2f8776eComparecodecovbot commented Nov 30, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #60913 +/- ## ========================================== + Coverage 88.55% 88.58% +0.02% ========================================== Files 703 703 Lines 208291 208296 +5 Branches 40170 40166 -4 ========================================== + Hits 184443 184509 +66 + Misses 15874 15807 -67 - Partials 7974 7980 +6
🚀 New features to boost your workflow:
|
gurgunday commented Dec 5, 2025
cc @nodejs/performance WDYT? |
H4ad commented Dec 6, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Before merging, some concerns raised in another PR with same changes:
Would mind giving some thoughts on this one, @mcollina and @Qard? Edit: |
Failed to start CI⚠ No approving reviews found ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/19980375054 |
Qard commented Dec 6, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@H4ad Yes, the same concern applies. It is, in my opinion, problematic that it was ever possible to start seeing events for a given task partway through its lifecycle rather than deciding at emit time if any of the events should be present. But that is certainly a breaking change and so should be marked as such. A desirable change, I think. But a breaking one nonetheless. At the same time though, async_hooks is still marked as experimental, and AsyncLocalStorage no longer relies on it, so the break is likely a lot less critical. We may be able to allow it without a major bump. I'm not strongly opinionated either way. |
mcollina left a comment
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
mcollina commented Dec 6, 2025
I'm ok in this being a minor, but I don't think we can backport it to 22. |
H4ad commented Dec 6, 2025
Benchmark result: Impressive 🚀 |
nodejs-github-bot commented Dec 6, 2025
mcollina left a comment
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
Qard left a comment
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 with one small nit.
Uh oh!
There was an error while loading. Please reload this page.
Flarna commented Dec 10, 2025
The linked PR #59873 was marked semver major. |
a65421a into nodejs:mainUh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Dec 21, 2025
Landed in a65421a |
PR-URL: nodejs#60913 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
PR-URL: #60913 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
PR-URL: #60913 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
PR-URL: #60913 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
Does the same optimization as #59873 for
queueMicrotaskbranch:
main