This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
process: optimize process.nextTick()
33% performance boost on large nextTick queues.
- Loading branch information
4d4900f
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.
@bnoordhuis - If a callback throws an exception, the following callbacks of
q
are never called (testcase is here).The remaining callbacks must be concatenated before
nextTickQueue
.4d4900f
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.
I'll take @koichik's patch. This commit is phase 1 of a two-pronged attack on getting rid of the O(n) calls to
process._needTickCallback()
because that's the real performance drain. Dropping theArray.splice()
is just icing on the cake.