Skip to content

Commit 3644f0b

Browse files
authored
Use completedRenderEndTime as the start of the commit phase if it's an immediate commit (#31527)
We don't log a phase like "Throttled" or "Suspended" for this case so it can leave a tiny gap otherwise. This ensures it connects without a seam. <img width="1059" alt="Screenshot 2024-11-12 at 9 34 17 PM" src="https://github.com/user-attachments/assets/7ed4a3c7-b508-4fc1-b956-44c4e31faa4d">
1 parent 8657869 commit 3644f0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,12 @@ function commitRootImpl(
32503250

32513251
if (enableProfilerTimer && enableComponentPerformanceTrack) {
32523252
recordCommitEndTime();
3253-
logCommitPhase(commitStartTime, commitEndTime);
3253+
logCommitPhase(
3254+
suspendedCommitReason === IMMEDIATE_COMMIT
3255+
? completedRenderEndTime
3256+
: commitStartTime,
3257+
commitEndTime,
3258+
);
32543259
}
32553260

32563261
const rootDidHavePassiveEffects = rootDoesHavePassiveEffects;

0 commit comments

Comments
 (0)