Skip to content

Commit

Permalink
[Fiber] Don't call performance.now() twice in a row (#30936)
Browse files Browse the repository at this point in the history
DiffTrain build for commit a5a7f10.
  • Loading branch information
sebmarkbage committed Sep 10, 2024
1 parent c56b0ed commit 9b5d5c3
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-66cf2cfc-20240910
19.0.0-native-fb-a5a7f106-20240910
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f2439c3bc71acb4262fec800dc93b6a8>>
* @generated SignedSource<<8f1af1317adb530cf5e93c6d98166d09>>
*/

"use strict";
Expand Down Expand Up @@ -5015,7 +5015,7 @@ __DEV__ &&
}
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = now());
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (0 <= profilerStartTime) {
Expand Down Expand Up @@ -15057,11 +15057,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -15206,5 +15206,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-66cf2cfc-20240910";
exports.version = "19.0.0-native-fb-a5a7f106-20240910";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<25b7bb8120d9f7b06b97ec9ca396e314>>
* @generated SignedSource<<b095e2e6edacc361f09aa3cc6aaae7c2>>
*/

"use strict";
Expand Down Expand Up @@ -9445,14 +9445,14 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1264 = {
bundleType: 0,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function (mockNode) {
mockNode = nodeToInstanceMap.get(mockNode);
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
},
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1265 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -9588,4 +9588,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-66cf2cfc-20240910";
exports.version = "19.0.0-native-fb-a5a7f106-20240910";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0de508771b94d6332922c2450b77ad5f>>
* @generated SignedSource<<34bf2e90c5560d580e7ce54b20ce9401>>
*/

"use strict";
Expand Down Expand Up @@ -3643,7 +3643,7 @@ var now = Scheduler$1.unstable_now,
nestedUpdateScheduled = !1;
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = now());
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (0 <= profilerStartTime) {
Expand Down Expand Up @@ -10033,14 +10033,14 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1139 = {
bundleType: 0,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function (mockNode) {
mockNode = nodeToInstanceMap.get(mockNode);
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
},
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910",
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$138 = 0;
Expand Down Expand Up @@ -10191,4 +10191,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-66cf2cfc-20240910";
exports.version = "19.0.0-native-fb-a5a7f106-20240910";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<456e029de5fd9f4d0bf68eedd05f7c81>>
* @generated SignedSource<<395e6191abddaefed047ed772df65f1b>>
*/

"use strict";
Expand Down Expand Up @@ -1705,7 +1705,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-native-fb-66cf2cfc-20240910";
exports.version = "19.0.0-native-fb-a5a7f106-20240910";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6d67ec9150a2cc4a4aa7a542b1fcfee9>>
* @generated SignedSource<<f22b3161b93b6824b6ceb474bbc2b825>>
*/

"use strict";
Expand Down Expand Up @@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-66cf2cfc-20240910";
exports.version = "19.0.0-native-fb-a5a7f106-20240910";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ef3afbee8ae541f05853831879ec8483>>
* @generated SignedSource<<b9f3c98a6ccf3e94f0035d14d68172ca>>
*/

"use strict";
Expand Down Expand Up @@ -584,7 +584,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-66cf2cfc-20240910";
exports.version = "19.0.0-native-fb-a5a7f106-20240910";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
66cf2cfc8a8c4b09d2b783fd7302ae6b24150935
a5a7f1063e6f190c64c779b2aa54d28fb7b92cfb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a1eb9c1fbcfc31ccea21e968a916b7d1>>
* @generated SignedSource<<896bf8b1f76305c76285784dae9ebb6d>>
*/

"use strict";
Expand Down Expand Up @@ -5901,7 +5901,7 @@ __DEV__ &&
}
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = now());
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (0 <= profilerStartTime) {
Expand Down Expand Up @@ -17033,11 +17033,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0957f41cf0c05a8013a5c3aef90921b1>>
* @generated SignedSource<<6bf9a920b8e728a4425f244949788e0c>>
*/

"use strict";
Expand Down Expand Up @@ -10978,11 +10978,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1162 = {
bundleType: 0,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1162.rendererConfig = extraDevToolsConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1a7aa7a59bbebec940703518e618897a>>
* @generated SignedSource<<8ad56df9c7b93b1db67af3c5c2b936cd>>
*/

"use strict";
Expand Down Expand Up @@ -4964,7 +4964,7 @@ var now = Scheduler.unstable_now,
nestedUpdateScheduled = !1;
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = now());
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (0 <= profilerStartTime) {
Expand Down Expand Up @@ -11656,11 +11656,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1247 = {
bundleType: 0,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1247.rendererConfig = extraDevToolsConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<987f05dd5f02291a5d0a9d00e8856490>>
* @generated SignedSource<<38906953b5d5c7b5c1b15f5d4e7aae29>>
*/

"use strict";
Expand Down Expand Up @@ -6125,7 +6125,7 @@ __DEV__ &&
}
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = now());
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (0 <= profilerStartTime) {
Expand Down Expand Up @@ -17257,11 +17257,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-66cf2cfc-20240910" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-a5a7f106-20240910" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-66cf2cfc-20240910\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-a5a7f106-20240910\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand All @@ -17287,11 +17287,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromTag,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<5c58ff2c047f730560b449a44c4c83b8>>
* @generated SignedSource<<09826de6b2f549defa34bff5f481a2a5>>
*/

"use strict";
Expand Down Expand Up @@ -11107,11 +11107,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-66cf2cfc-20240910" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-a5a7f106-20240910" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-66cf2cfc-20240910\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-a5a7f106-20240910\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -11160,11 +11160,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1228 = {
bundleType: 0,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromTag,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1228.rendererConfig = extraDevToolsConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<fff367e5b0280e38cc58fe8f41450129>>
* @generated SignedSource<<cb17cfaa2a5ce245e4e8e3001a4713f1>>
*/

"use strict";
Expand Down Expand Up @@ -5253,7 +5253,7 @@ var now = Scheduler.unstable_now,
nestedUpdateScheduled = !1;
function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = now());
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (0 <= profilerStartTime) {
Expand Down Expand Up @@ -11786,11 +11786,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-66cf2cfc-20240910" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-a5a7f106-20240910" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-66cf2cfc-20240910\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-a5a7f106-20240910\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -11839,11 +11839,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1313 = {
bundleType: 0,
version: "19.0.0-native-fb-66cf2cfc-20240910",
version: "19.0.0-native-fb-a5a7f106-20240910",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromTag,
reconcilerVersion: "19.0.0-native-fb-66cf2cfc-20240910"
reconcilerVersion: "19.0.0-native-fb-a5a7f106-20240910"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1313.rendererConfig = extraDevToolsConfig);
Expand Down

0 comments on commit 9b5d5c3

Please sign in to comment.