Skip to content

Commit

Permalink
Use completedRenderEndTime as the start of the commit phase if it's a…
Browse files Browse the repository at this point in the history
…n immediate commit

We don't log a phase like "Throttled" or "Suspended" for this case so it can leave a tiny gap otherwise.
  • Loading branch information
sebmarkbage committed Nov 13, 2024
1 parent 3770c11 commit 7341895
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -3250,7 +3250,12 @@ function commitRootImpl(

if (enableProfilerTimer && enableComponentPerformanceTrack) {
recordCommitEndTime();
logCommitPhase(commitStartTime, commitEndTime);
logCommitPhase(
suspendedCommitReason === IMMEDIATE_COMMIT
? completedRenderEndTime
: commitStartTime,
commitEndTime,
);
}

const rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
Expand Down

0 comments on commit 7341895

Please sign in to comment.