Skip to content

async_hooks: only set up hooks if used #13177

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

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

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), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

async_hooks

@addaleax addaleax added the async_hooks Issues and PRs related to the async hooks subsystem. label May 23, 2017
@addaleax addaleax added this to the 8.0.0 milestone May 23, 2017
@nodejs-github-bot nodejs-github-bot added the async_hooks Issues and PRs related to the async hooks subsystem. label May 23, 2017
@Fishrock123
Copy link
Contributor

Copy link
Member

@AndreasMadsen AndreasMadsen left a 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.

@addaleax
Copy link
Member Author

Landed in 410b141

@addaleax addaleax closed this May 25, 2017
@addaleax addaleax deleted the async-hooks-lazy branch May 25, 2017 16:21
addaleax added a commit that referenced this pull request May 25, 2017
PR-URL: #13177
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell pushed a commit that referenced this pull request May 25, 2017
PR-URL: #13177
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell pushed a commit that referenced this pull request May 28, 2017
PR-URL: #13177
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@jasnell jasnell mentioned this pull request May 28, 2017
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
@MylesBorins
Copy link
Contributor

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)

@addaleax
Copy link
Member Author

@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)

@AndreasMadsen
Copy link
Member

I've removed the lts-watch from this PR and added it to the main AsyncHooks PR #12892.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
async_hooks Issues and PRs related to the async hooks subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants