-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
async_hooks: only set up hooks if used #13177
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. There are quite a few places where we require('async_hooks')
, so this seems like a good optimization.
Landed in 410b141 |
PR-URL: #13177 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Andreas Madsen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #13177 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Andreas Madsen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #13177 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Andreas Madsen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
assuming don't land, let me know if it needs to be included for future async_hooks backport (in which case switch to lts-watch) |
@MylesBorins I think we’d want to backport most of async_hooks as it is in v8.x/master if we do, not backport the individual changes, so dont-land seems fine to me, just with different semantics? (I am relabelling to lts-watch though, as requested) |
I've removed the lts-watch from this PR and added it to the main AsyncHooks PR #12892. |
Splitting this out from #13000 to have it get reviewed on its own. I think it makes sense but I’d like some kind of confirmation. (Motivation was that setting up Promise hooks for async_wrap is likely to have some kind of noticeable performance impact, probably even once we have the internal fields, so we might not want to have that unconditionally.)
@nodejs/diagnostics
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
async_hooks