Repository navigation
Report process.nextTick() as a microtask to the dependency graph - #243
Merged
Merged
Conversation
Domiii
force-pushed
the
dominik/node-dg-ticks
branch
from
November 17, 2026 17:32
141311e to
d90b0db
Compare
process.nextTick() callbacks are reported with the kinds of
queueMicrotask(): enqueueMicrotask -scheduler-> runMicrotask, instead of
asyncInit{TickObject} -scheduler-> asyncCallback.
The tick queue drains in the same turn as the code that queued it, before
any other task, as microtasks do. The backend treats asyncCallback after
asyncInit as a task boundary with a scheduling delay, which a tick does not
have.
Prod behavior: unchanged. The same single JS boolean check per tick when
unrecorded, and one binding call per tick when recording.
Domiii
force-pushed
the
dominik/node-dg-ticks
branch
from
November 17, 2026 17:51
d90b0db to
83c40b4
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤖
Summary
process.nextTick()is reported as a generic async op,asyncInit{TickObject} -scheduler-> asyncCallback.asyncCallbackafterasyncInitas a new task with a scheduling delay.limitingPath.tsisDependencyScheduling.enqueueMicrotask -scheduler-> runMicrotask.queueMicrotask(). Chromium uses them for microtasks.nextTickwith these kinds.Change
nextTickinitializes its op with thekMicrotaskclass instead ofkGeneric.Prod behavior
Data
process.nextTick, medians of 3 runs, ms:RECORD_REPLAY_DISABLE_FEATURES=["dependency-graph"]: 21