Skip to content
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

process: improve nextTick performance #27347

Closed
wants to merge 1 commit into from

Conversation

apapirovski
Copy link
Member

@apapirovski apapirovski commented Apr 22, 2019

  • No longer use symbols for asyncId & triggerAsyncId. This borrows from the seemingly abandoned PR at process: improve nextTick performance #25461 by @mscdex. (Credit provided in the commit but happy to also remove this portion of the code.)
  • No longer check process.exiting on each tick add.
  • Cleaner emitDestroy with try/finally.
  • No longer use Reflect.apply since it's slower.

CI: https://ci.nodejs.org/job/node-test-pull-request/22633/

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the process Issues and PRs related to the process subsystem. label Apr 22, 2019
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@mscdex
Copy link
Contributor

mscdex commented Apr 22, 2019

FWIW my PR for improving nextTick performance isn't abandoned, I just haven't had time to revisit it yet.

Also, this PR is now exposing asyncId and triggerAsyncId on the object passed to the hook(s) more directly. I think we should be hiding those sorts of things from hooks, as I believe that may be why Symbols were used in the first place.

@apapirovski
Copy link
Member Author

FWIW my PR for improving nextTick performance isn't abandoned, I just haven't had time to revisit it yet.

👍 will remove from here.

No longer check process.exiting on each tick add.
Cleaner emitDestroy with try/finally.
No longer use Reflect.apply since it's slower.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants