-
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
process: slight refinements to nextTick #17421
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addaleax
approved these changes
Dec 2, 2017
addaleax
added
the
performance
Issues and PRs related to the performance of Node.js.
label
Dec 2, 2017
lpinca
approved these changes
Dec 2, 2017
jasnell
approved these changes
Dec 5, 2017
apapirovski
added a commit
that referenced
this pull request
Dec 6, 2017
Remove length prop on NextTickQueue class. We technically don't need to keep track of the length of the queue in two places as we already have tickInfo doing that work (between the index & the length we have enough data for everything). Store asyncId in a const within the _tickCallback function. Accessing Symbol properties seems to be quite a bit more expensive than string keys so this actually has a decent performance impact. PR-URL: #17421 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in b1acba3 |
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
Remove length prop on NextTickQueue class. We technically don't need to keep track of the length of the queue in two places as we already have tickInfo doing that work (between the index & the length we have enough data for everything). Store asyncId in a const within the _tickCallback function. Accessing Symbol properties seems to be quite a bit more expensive than string keys so this actually has a decent performance impact. PR-URL: #17421 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
Remove length prop on NextTickQueue class. We technically don't need to keep track of the length of the queue in two places as we already have tickInfo doing that work (between the index & the length we have enough data for everything). Store asyncId in a const within the _tickCallback function. Accessing Symbol properties seems to be quite a bit more expensive than string keys so this actually has a decent performance impact. PR-URL: #17421 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
gibfahn
added
baking-for-lts
PRs that need to wait before landing in a LTS release.
lts-watch-v6.x
labels
Dec 20, 2017
Were the perf benefits in this high enough to backport? |
targos
removed
the
baking-for-lts
PRs that need to wait before landing in a LTS release.
label
Sep 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
performance
Issues and PRs related to the performance of Node.js.
process
Issues and PRs related to the process subsystem.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple of very slight refinements to
process.nextTick
& its supporting code.length
prop onNextTickQueue
class. We technically don't need to keep track of the length of the queue in two places as we already havetickInfo
doing that work (between the index & the length we have enough data for everything).asyncId
in a const within the_tickCallback
function. Accessing symbol properties seems to be quite a bit more expensive than string keys so this actually has a decent performance impact.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
process