Skip to content

Commit 109631e

Browse files
committed
Log Custom Reason for the Suspended Commit Track (#34522)
Stacked on #34511. We currently log all Suspended Commit as "Suspended on Images or CSS" but it can really be other reasons too now. Like waiting on the previous View Transition. This allows the host config configure this reason. Now when one animation starts before another one finishes we log that as "Waiting for the previous Animation". <img width="592" height="257" alt="Screenshot 2025-09-17 at 11 53 45 PM" src="https://github.com/user-attachments/assets/817af8b5-37ae-46d8-bfd1-cd3fc637f3f3" /> DiffTrain build for [b204edd](b204edd)
1 parent 9f8abe3 commit 109631e

34 files changed

+428
-618
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ad578aa01fcd08488b8378c7538d802e7a1e8b26
1+
b204edda3aa397243faa267512811b778542f6a5
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ad578aa01fcd08488b8378c7538d802e7a1e8b26
1+
b204edda3aa397243faa267512811b778542f6a5

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ __DEV__ &&
14191419
exports.useTransition = function () {
14201420
return resolveDispatcher().useTransition();
14211421
};
1422-
exports.version = "19.2.0-www-classic-ad578aa0-20250918";
1422+
exports.version = "19.2.0-www-classic-b204edda-20250920";
14231423
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14241424
"function" ===
14251425
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ __DEV__ &&
14191419
exports.useTransition = function () {
14201420
return resolveDispatcher().useTransition();
14211421
};
1422-
exports.version = "19.2.0-www-modern-ad578aa0-20250918";
1422+
exports.version = "19.2.0-www-modern-b204edda-20250920";
14231423
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14241424
"function" ===
14251425
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,4 @@ exports.useSyncExternalStore = function (
602602
exports.useTransition = function () {
603603
return ReactSharedInternals.H.useTransition();
604604
};
605-
exports.version = "19.2.0-www-classic-ad578aa0-20250918";
605+
exports.version = "19.2.0-www-classic-b204edda-20250920";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,4 @@ exports.useSyncExternalStore = function (
602602
exports.useTransition = function () {
603603
return ReactSharedInternals.H.useTransition();
604604
};
605-
exports.version = "19.2.0-www-modern-ad578aa0-20250918";
605+
exports.version = "19.2.0-www-modern-b204edda-20250920";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.2.0-www-classic-ad578aa0-20250918";
609+
exports.version = "19.2.0-www-classic-b204edda-20250920";
610610
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
611611
"function" ===
612612
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.2.0-www-modern-ad578aa0-20250918";
609+
exports.version = "19.2.0-www-modern-b204edda-20250920";
610610
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
611611
"function" ===
612612
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 18 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,14 +1815,14 @@ __DEV__ &&
18151815
"error"
18161816
));
18171817
}
1818-
function logSuspenseThrottlePhase(startTime, endTime, debugTask) {
1818+
function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
18191819
!supportsUserTiming ||
18201820
endTime <= startTime ||
18211821
(debugTask
18221822
? debugTask.run(
18231823
console.timeStamp.bind(
18241824
console,
1825-
"Throttled",
1825+
reason,
18261826
startTime,
18271827
endTime,
18281828
currentTrack,
@@ -1831,31 +1831,7 @@ __DEV__ &&
18311831
)
18321832
)
18331833
: console.timeStamp(
1834-
"Throttled",
1835-
startTime,
1836-
endTime,
1837-
currentTrack,
1838-
"Scheduler \u269b",
1839-
"secondary-light"
1840-
));
1841-
}
1842-
function logSuspendedCommitPhase(startTime, endTime, debugTask) {
1843-
!supportsUserTiming ||
1844-
endTime <= startTime ||
1845-
(debugTask
1846-
? debugTask.run(
1847-
console.timeStamp.bind(
1848-
console,
1849-
"Suspended on CSS or Images",
1850-
startTime,
1851-
endTime,
1852-
currentTrack,
1853-
"Scheduler \u269b",
1854-
"secondary-light"
1855-
)
1856-
)
1857-
: console.timeStamp(
1858-
"Suspended on CSS or Images",
1834+
reason,
18591835
startTime,
18601836
endTime,
18611837
currentTrack,
@@ -14880,7 +14856,7 @@ __DEV__ &&
1488014856
workInProgressSuspendedRetryLanes,
1488114857
startTime,
1488214858
null,
14883-
IMMEDIATE_COMMIT,
14859+
null,
1488414860
renderStartTime,
1488514861
forceSync
1488614862
);
@@ -14915,7 +14891,7 @@ __DEV__ &&
1491514891
workInProgressSuspendedRetryLanes,
1491614892
workInProgressRootDidSkipSuspendedSiblings,
1491714893
startTime,
14918-
THROTTLED_COMMIT,
14894+
"Throttled",
1491914895
renderStartTime,
1492014896
forceSync
1492114897
),
@@ -14935,7 +14911,7 @@ __DEV__ &&
1493514911
workInProgressSuspendedRetryLanes,
1493614912
workInProgressRootDidSkipSuspendedSiblings,
1493714913
startTime,
14938-
IMMEDIATE_COMMIT,
14914+
null,
1493914915
renderStartTime,
1494014916
forceSync
1494114917
);
@@ -16137,18 +16113,13 @@ __DEV__ &&
1613716113
commitErrors = null;
1613816114
commitStartTime = now();
1613916115
enableComponentPerformanceTrack &&
16140-
(suspendedCommitReason === SUSPENDED_COMMIT
16141-
? logSuspendedCommitPhase(
16142-
completedRenderEndTime,
16143-
commitStartTime,
16144-
workInProgressUpdateTask
16145-
)
16146-
: suspendedCommitReason === THROTTLED_COMMIT &&
16147-
logSuspenseThrottlePhase(
16148-
completedRenderEndTime,
16149-
commitStartTime,
16150-
workInProgressUpdateTask
16151-
));
16116+
null !== suspendedCommitReason &&
16117+
logSuspendedCommitPhase(
16118+
completedRenderEndTime,
16119+
commitStartTime,
16120+
suspendedCommitReason,
16121+
workInProgressUpdateTask
16122+
);
1615216123
shouldStartViewTransition = !1;
1615316124
suspendedCommitReason = 0 !== (finishedWork.flags & 13878);
1615416125
if (
@@ -16309,7 +16280,7 @@ __DEV__ &&
1630916280
enableComponentPerformanceTrack &&
1631016281
((commitEndTime = now()),
1631116282
(suspendedViewTransitionReason =
16312-
startTime === IMMEDIATE_COMMIT
16283+
null === startTime
1631316284
? suspendedViewTransitionReason
1631416285
: commitStartTime),
1631516286
(startTime = commitEndTime),
@@ -19634,8 +19605,6 @@ __DEV__ &&
1963419605
currentEndTime = null,
1963519606
legacyErrorBoundariesThatAlreadyFailed = null,
1963619607
IMMEDIATE_COMMIT = 0,
19637-
SUSPENDED_COMMIT = 1,
19638-
THROTTLED_COMMIT = 2,
1963919608
ABORTED_VIEW_TRANSITION_COMMIT = 1,
1964019609
DELAYED_PASSIVE_COMMIT = 2,
1964119610
ANIMATION_STARTED_COMMIT = 3,
@@ -19657,7 +19626,7 @@ __DEV__ &&
1965719626
pendingViewTransitionEvents = null,
1965819627
pendingTransitionTypes = null,
1965919628
pendingDidIncludeRenderPhaseUpdate = !1,
19660-
pendingSuspendedCommitReason = IMMEDIATE_COMMIT,
19629+
pendingSuspendedCommitReason = null,
1966119630
pendingDelayedCommitReason = IMMEDIATE_COMMIT,
1966219631
pendingSuspendedViewTransitionReason = null,
1966319632
NESTED_UPDATE_LIMIT = 50,
@@ -19899,10 +19868,10 @@ __DEV__ &&
1989919868
(function () {
1990019869
var internals = {
1990119870
bundleType: 1,
19902-
version: "19.2.0-www-classic-ad578aa0-20250918",
19871+
version: "19.2.0-www-classic-b204edda-20250920",
1990319872
rendererPackageName: "react-art",
1990419873
currentDispatcherRef: ReactSharedInternals,
19905-
reconcilerVersion: "19.2.0-www-classic-ad578aa0-20250918"
19874+
reconcilerVersion: "19.2.0-www-classic-b204edda-20250920"
1990619875
};
1990719876
internals.overrideHookState = overrideHookState;
1990819877
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19936,7 +19905,7 @@ __DEV__ &&
1993619905
exports.Shape = Shape;
1993719906
exports.Surface = Surface;
1993819907
exports.Text = Text;
19939-
exports.version = "19.2.0-www-classic-ad578aa0-20250918";
19908+
exports.version = "19.2.0-www-classic-b204edda-20250920";
1994019909
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1994119910
"function" ===
1994219911
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 18 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,14 +1721,14 @@ __DEV__ &&
17211721
"error"
17221722
));
17231723
}
1724-
function logSuspenseThrottlePhase(startTime, endTime, debugTask) {
1724+
function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
17251725
!supportsUserTiming ||
17261726
endTime <= startTime ||
17271727
(debugTask
17281728
? debugTask.run(
17291729
console.timeStamp.bind(
17301730
console,
1731-
"Throttled",
1731+
reason,
17321732
startTime,
17331733
endTime,
17341734
currentTrack,
@@ -1737,31 +1737,7 @@ __DEV__ &&
17371737
)
17381738
)
17391739
: console.timeStamp(
1740-
"Throttled",
1741-
startTime,
1742-
endTime,
1743-
currentTrack,
1744-
"Scheduler \u269b",
1745-
"secondary-light"
1746-
));
1747-
}
1748-
function logSuspendedCommitPhase(startTime, endTime, debugTask) {
1749-
!supportsUserTiming ||
1750-
endTime <= startTime ||
1751-
(debugTask
1752-
? debugTask.run(
1753-
console.timeStamp.bind(
1754-
console,
1755-
"Suspended on CSS or Images",
1756-
startTime,
1757-
endTime,
1758-
currentTrack,
1759-
"Scheduler \u269b",
1760-
"secondary-light"
1761-
)
1762-
)
1763-
: console.timeStamp(
1764-
"Suspended on CSS or Images",
1740+
reason,
17651741
startTime,
17661742
endTime,
17671743
currentTrack,
@@ -14698,7 +14674,7 @@ __DEV__ &&
1469814674
workInProgressSuspendedRetryLanes,
1469914675
startTime,
1470014676
null,
14701-
IMMEDIATE_COMMIT,
14677+
null,
1470214678
renderStartTime,
1470314679
forceSync
1470414680
);
@@ -14733,7 +14709,7 @@ __DEV__ &&
1473314709
workInProgressSuspendedRetryLanes,
1473414710
workInProgressRootDidSkipSuspendedSiblings,
1473514711
startTime,
14736-
THROTTLED_COMMIT,
14712+
"Throttled",
1473714713
renderStartTime,
1473814714
forceSync
1473914715
),
@@ -14753,7 +14729,7 @@ __DEV__ &&
1475314729
workInProgressSuspendedRetryLanes,
1475414730
workInProgressRootDidSkipSuspendedSiblings,
1475514731
startTime,
14756-
IMMEDIATE_COMMIT,
14732+
null,
1475714733
renderStartTime,
1475814734
forceSync
1475914735
);
@@ -15950,18 +15926,13 @@ __DEV__ &&
1595015926
commitErrors = null;
1595115927
commitStartTime = now();
1595215928
enableComponentPerformanceTrack &&
15953-
(suspendedCommitReason === SUSPENDED_COMMIT
15954-
? logSuspendedCommitPhase(
15955-
completedRenderEndTime,
15956-
commitStartTime,
15957-
workInProgressUpdateTask
15958-
)
15959-
: suspendedCommitReason === THROTTLED_COMMIT &&
15960-
logSuspenseThrottlePhase(
15961-
completedRenderEndTime,
15962-
commitStartTime,
15963-
workInProgressUpdateTask
15964-
));
15929+
null !== suspendedCommitReason &&
15930+
logSuspendedCommitPhase(
15931+
completedRenderEndTime,
15932+
commitStartTime,
15933+
suspendedCommitReason,
15934+
workInProgressUpdateTask
15935+
);
1596515936
shouldStartViewTransition = !1;
1596615937
suspendedCommitReason = 0 !== (finishedWork.flags & 13878);
1596715938
if (
@@ -16122,7 +16093,7 @@ __DEV__ &&
1612216093
enableComponentPerformanceTrack &&
1612316094
((commitEndTime = now()),
1612416095
(suspendedViewTransitionReason =
16125-
startTime === IMMEDIATE_COMMIT
16096+
null === startTime
1612616097
? suspendedViewTransitionReason
1612716098
: commitStartTime),
1612816099
(startTime = commitEndTime),
@@ -19405,8 +19376,6 @@ __DEV__ &&
1940519376
currentEndTime = null,
1940619377
legacyErrorBoundariesThatAlreadyFailed = null,
1940719378
IMMEDIATE_COMMIT = 0,
19408-
SUSPENDED_COMMIT = 1,
19409-
THROTTLED_COMMIT = 2,
1941019379
ABORTED_VIEW_TRANSITION_COMMIT = 1,
1941119380
DELAYED_PASSIVE_COMMIT = 2,
1941219381
ANIMATION_STARTED_COMMIT = 3,
@@ -19428,7 +19397,7 @@ __DEV__ &&
1942819397
pendingViewTransitionEvents = null,
1942919398
pendingTransitionTypes = null,
1943019399
pendingDidIncludeRenderPhaseUpdate = !1,
19431-
pendingSuspendedCommitReason = IMMEDIATE_COMMIT,
19400+
pendingSuspendedCommitReason = null,
1943219401
pendingDelayedCommitReason = IMMEDIATE_COMMIT,
1943319402
pendingSuspendedViewTransitionReason = null,
1943419403
NESTED_UPDATE_LIMIT = 50,
@@ -19670,10 +19639,10 @@ __DEV__ &&
1967019639
(function () {
1967119640
var internals = {
1967219641
bundleType: 1,
19673-
version: "19.2.0-www-modern-ad578aa0-20250918",
19642+
version: "19.2.0-www-modern-b204edda-20250920",
1967419643
rendererPackageName: "react-art",
1967519644
currentDispatcherRef: ReactSharedInternals,
19676-
reconcilerVersion: "19.2.0-www-modern-ad578aa0-20250918"
19645+
reconcilerVersion: "19.2.0-www-modern-b204edda-20250920"
1967719646
};
1967819647
internals.overrideHookState = overrideHookState;
1967919648
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19707,7 +19676,7 @@ __DEV__ &&
1970719676
exports.Shape = Shape;
1970819677
exports.Surface = Surface;
1970919678
exports.Text = Text;
19710-
exports.version = "19.2.0-www-modern-ad578aa0-20250918";
19679+
exports.version = "19.2.0-www-modern-b204edda-20250920";
1971119680
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1971219681
"function" ===
1971319682
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)