Skip to content

Commit 7723329

Browse files
committed
Log Performance Track Entries for View Transitions (facebook#34510)
Stacked on facebook#34509. View Transitions introduces a bunch of new types of gaps in the commit phase which needs to be logged differently in the performance track. One thing that can happen is that a `flushSync` update forces the View Transition to abort before it has started if it happens in the gap before the transition is ready. In that case we log "Interrupted View Transition". Otherwise, when we're done in `startViewTransition` there's some work to finalize the animations before the `ready` calllback. This is logged as "Starting Animation". Then there's a gap before the passive effects fire which we log as "Animating". This can be long unless they're forced to flush early e.g. due to another lane updating. The "Animating" track should then pick up which doesn't do yet. This one is tricky because this is after the actual commit phase and needs to be interrupted by new renders which themselves can be suspended on the animation finshing. This PR is just a subset of all the cases. Will need a lot more work. <img width="679" height="161" alt="Screenshot 2025-09-16 at 10 19 06 PM" src="https://github.com/user-attachments/assets/0407372d-aaed-41f5-a262-059b2686ae87" /> DiffTrain build for [84af908](facebook@84af908)
1 parent 70fc333 commit 7723329

26 files changed

+2311
-1711
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.2.0-native-fb-a51f9252-20250916
1+
19.2.0-native-fb-84af9085-20250917

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<58dd45e0f7cd7ee34494cdf90fd3b29f>>
10+
* @generated SignedSource<<a79fe694fabda54854d9a6e73b575436>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.2.0-native-fb-a51f9252-20250916";
407+
exports.version = "19.2.0-native-fb-84af9085-20250917";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<b01b3421eb2cb04caf9a4eb513e54221>>
10+
* @generated SignedSource<<e947a773073a01a9f5df27222d40fb3e>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-a51f9252-20250916";
206+
exports.version = "19.2.0-native-fb-84af9085-20250917";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<b01b3421eb2cb04caf9a4eb513e54221>>
10+
* @generated SignedSource<<e947a773073a01a9f5df27222d40fb3e>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-a51f9252-20250916";
206+
exports.version = "19.2.0-native-fb-84af9085-20250917";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 415 additions & 312 deletions
Large diffs are not rendered by default.

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<abca8259b8556273be6c4c6b042baee1>>
10+
* @generated SignedSource<<71f962667fe3c137038062ba1b874aca>>
1111
*/
1212

1313
/*
@@ -12354,7 +12354,7 @@ function commitRoot(
1235412354
? ((root.callbackNode = null),
1235512355
(root.callbackPriority = 0),
1235612356
scheduleCallback$1(NormalPriority$1, function () {
12357-
flushPassiveEffects(!0);
12357+
flushPassiveEffects();
1235812358
return null;
1235912359
}))
1236012360
: ((root.callbackNode = null), (root.callbackPriority = 0));
@@ -12642,11 +12642,11 @@ function releaseRootPooledCache(root, remainingLanes) {
1264212642
null != remainingLanes &&
1264312643
((root.pooledCache = null), releaseCache(remainingLanes)));
1264412644
}
12645-
function flushPendingEffects(wasDelayedCommit) {
12645+
function flushPendingEffects() {
1264612646
flushMutationEffects();
1264712647
flushLayoutEffects();
1264812648
flushSpawnedWork();
12649-
return flushPassiveEffects(wasDelayedCommit);
12649+
return flushPassiveEffects();
1265012650
}
1265112651
function flushPassiveEffects() {
1265212652
if (5 !== pendingEffectsStatus) return !1;
@@ -13016,7 +13016,7 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) {
1301613016
if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)
1301713017
return (root.callbackNode = null), (root.callbackPriority = 0), null;
1301813018
var originalCallbackNode = root.callbackNode;
13019-
if (flushPendingEffects(!0) && root.callbackNode !== originalCallbackNode)
13019+
if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)
1302013020
return null;
1302113021
var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
1302213022
workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
@@ -13187,20 +13187,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) {
1318713187
(nativeEventTarget[internalScrollTimer] = targetInst));
1318813188
}
1318913189
for (
13190-
var i$jscomp$inline_1664 = 0;
13191-
i$jscomp$inline_1664 < simpleEventPluginEvents.length;
13192-
i$jscomp$inline_1664++
13190+
var i$jscomp$inline_1663 = 0;
13191+
i$jscomp$inline_1663 < simpleEventPluginEvents.length;
13192+
i$jscomp$inline_1663++
1319313193
) {
13194-
var eventName$jscomp$inline_1665 =
13195-
simpleEventPluginEvents[i$jscomp$inline_1664],
13196-
domEventName$jscomp$inline_1666 =
13197-
eventName$jscomp$inline_1665.toLowerCase(),
13198-
capitalizedEvent$jscomp$inline_1667 =
13199-
eventName$jscomp$inline_1665[0].toUpperCase() +
13200-
eventName$jscomp$inline_1665.slice(1);
13194+
var eventName$jscomp$inline_1664 =
13195+
simpleEventPluginEvents[i$jscomp$inline_1663],
13196+
domEventName$jscomp$inline_1665 =
13197+
eventName$jscomp$inline_1664.toLowerCase(),
13198+
capitalizedEvent$jscomp$inline_1666 =
13199+
eventName$jscomp$inline_1664[0].toUpperCase() +
13200+
eventName$jscomp$inline_1664.slice(1);
1320113201
registerSimpleEvent(
13202-
domEventName$jscomp$inline_1666,
13203-
"on" + capitalizedEvent$jscomp$inline_1667
13202+
domEventName$jscomp$inline_1665,
13203+
"on" + capitalizedEvent$jscomp$inline_1666
1320413204
);
1320513205
}
1320613206
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -17523,16 +17523,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1752317523
0 === i && attemptExplicitHydrationTarget(target);
1752417524
}
1752517525
};
17526-
var isomorphicReactPackageVersion$jscomp$inline_2073 = React.version;
17526+
var isomorphicReactPackageVersion$jscomp$inline_2072 = React.version;
1752717527
if (
17528-
"19.2.0-native-fb-a51f9252-20250916" !==
17529-
isomorphicReactPackageVersion$jscomp$inline_2073
17528+
"19.2.0-native-fb-84af9085-20250917" !==
17529+
isomorphicReactPackageVersion$jscomp$inline_2072
1753017530
)
1753117531
throw Error(
1753217532
formatProdErrorMessage(
1753317533
527,
17534-
isomorphicReactPackageVersion$jscomp$inline_2073,
17535-
"19.2.0-native-fb-a51f9252-20250916"
17534+
isomorphicReactPackageVersion$jscomp$inline_2072,
17535+
"19.2.0-native-fb-84af9085-20250917"
1753617536
)
1753717537
);
1753817538
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17552,24 +17552,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1755217552
null === componentOrElement ? null : componentOrElement.stateNode;
1755317553
return componentOrElement;
1755417554
};
17555-
var internals$jscomp$inline_2646 = {
17555+
var internals$jscomp$inline_2645 = {
1755617556
bundleType: 0,
17557-
version: "19.2.0-native-fb-a51f9252-20250916",
17557+
version: "19.2.0-native-fb-84af9085-20250917",
1755817558
rendererPackageName: "react-dom",
1755917559
currentDispatcherRef: ReactSharedInternals,
17560-
reconcilerVersion: "19.2.0-native-fb-a51f9252-20250916"
17560+
reconcilerVersion: "19.2.0-native-fb-84af9085-20250917"
1756117561
};
1756217562
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
17563-
var hook$jscomp$inline_2647 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
17563+
var hook$jscomp$inline_2646 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1756417564
if (
17565-
!hook$jscomp$inline_2647.isDisabled &&
17566-
hook$jscomp$inline_2647.supportsFiber
17565+
!hook$jscomp$inline_2646.isDisabled &&
17566+
hook$jscomp$inline_2646.supportsFiber
1756717567
)
1756817568
try {
17569-
(rendererID = hook$jscomp$inline_2647.inject(
17570-
internals$jscomp$inline_2646
17569+
(rendererID = hook$jscomp$inline_2646.inject(
17570+
internals$jscomp$inline_2645
1757117571
)),
17572-
(injectedHook = hook$jscomp$inline_2647);
17572+
(injectedHook = hook$jscomp$inline_2646);
1757317573
} catch (err) {}
1757417574
}
1757517575
exports.createRoot = function (container, options) {
@@ -17664,4 +17664,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1766417664
listenToAllSupportedEvents(container);
1766517665
return new ReactDOMHydrationRoot(initialChildren);
1766617666
};
17667-
exports.version = "19.2.0-native-fb-a51f9252-20250916";
17667+
exports.version = "19.2.0-native-fb-84af9085-20250917";

0 commit comments

Comments
 (0)