Skip to content

Commit

Permalink
Clean up context access profiling experiment (#31806)
Browse files Browse the repository at this point in the history
We introduced the `unstable_useContextWithBailout` API to run compiler
based experiments. This API was designed to be an experiment proxy for
alternative approaches which would be heavier to implement. The
experiment turned out to be inconclusive. Since most of our performance
critical usage is already optimized, we weren't able to find a clear win
with this approach.

Since we don't have further plans for this API, let's clean it up.

DiffTrain build for [909ed63](909ed63)
  • Loading branch information
jackpope committed Dec 16, 2024
1 parent b2af848 commit ec257f2
Show file tree
Hide file tree
Showing 23 changed files with 86 additions and 95 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.1.0-native-fb-e06c72fc-20241215
19.1.0-native-fb-909ed63e-20241216
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9926d2aac6782c4d4cdbae0e84d1517e>>
* @generated SignedSource<<44e4f5406673c6231d47f72fef260769>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<40044f2b73d92b559f25b1f678a2fc3c>>
* @generated SignedSource<<c8a81d9a7e576754204782c77648dd2b>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<40044f2b73d92b559f25b1f678a2fc3c>>
* @generated SignedSource<<c8a81d9a7e576754204782c77648dd2b>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7631d97db34554856db19e5d2b32fbe2>>
* @generated SignedSource<<c707975af10f43c0528f615f7581aab6>>
*/

/*
Expand Down Expand Up @@ -25891,11 +25891,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-e06c72fc-20241215" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-909ed63e-20241216" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-e06c72fc-20241215\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-909ed63e-20241216\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25932,10 +25932,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215"
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26081,5 +26081,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0bd0131f657cf6165007ce600d7673fb>>
* @generated SignedSource<<228efb504e000ca7558ff605a12df677>>
*/

/*
Expand Down Expand Up @@ -15867,14 +15867,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1722 = React.version;
if (
"19.1.0-native-fb-e06c72fc-20241215" !==
"19.1.0-native-fb-909ed63e-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1722
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1722,
"19.1.0-native-fb-e06c72fc-20241215"
"19.1.0-native-fb-909ed63e-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15896,10 +15896,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2177 = {
bundleType: 0,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215"
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2178 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16005,4 +16005,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b7bea36bc8991c762b087566dbbd5e81>>
* @generated SignedSource<<14a638f5f5b68ebb01e21b6696be6f4f>>
*/

/*
Expand Down Expand Up @@ -16520,14 +16520,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1812 = React.version;
if (
"19.1.0-native-fb-e06c72fc-20241215" !==
"19.1.0-native-fb-909ed63e-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1812
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1812,
"19.1.0-native-fb-e06c72fc-20241215"
"19.1.0-native-fb-909ed63e-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16549,10 +16549,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1819 = {
bundleType: 0,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215",
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16673,4 +16673,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e5d1903005849c428b135dae1ed10dbf>>
* @generated SignedSource<<05fb79898af8114507aab32dbca135dd>>
*/

/*
Expand Down Expand Up @@ -25952,11 +25952,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-e06c72fc-20241215" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-909ed63e-20241216" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-e06c72fc-20241215\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-909ed63e-20241216\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25993,10 +25993,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215"
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26458,7 +26458,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
"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<<fdfde35c25d2bc358c04b55000a2d32e>>
* @generated SignedSource<<3e15f458c990e9583465d892a44e86aa>>
*/

/*
Expand Down Expand Up @@ -15878,14 +15878,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1723 = React.version;
if (
"19.1.0-native-fb-e06c72fc-20241215" !==
"19.1.0-native-fb-909ed63e-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1723
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1723,
"19.1.0-native-fb-e06c72fc-20241215"
"19.1.0-native-fb-909ed63e-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15907,10 +15907,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2180 = {
bundleType: 0,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215"
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2181 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16170,4 +16170,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<463c6d4c6595b361c24db8aed82edc07>>
* @generated SignedSource<<9ad0c4c7e2b3e9b9295627713b8820d6>>
*/

/*
Expand Down Expand Up @@ -16535,14 +16535,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1813 = React.version;
if (
"19.1.0-native-fb-e06c72fc-20241215" !==
"19.1.0-native-fb-909ed63e-20241216" !==
isomorphicReactPackageVersion$jscomp$inline_1813
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1813,
"19.1.0-native-fb-e06c72fc-20241215"
"19.1.0-native-fb-909ed63e-20241216"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16564,10 +16564,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1820 = {
bundleType: 0,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215",
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16842,7 +16842,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
"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<<a517df411392761c0275e6bd65df4cb2>>
* @generated SignedSource<<0afd16134514eb3b83dff235a3ca8af3>>
*/

"use strict";
Expand Down Expand Up @@ -15525,10 +15525,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215"
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -15673,5 +15673,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a58cb5b4d9d8dcf144862a836ba85d7c>>
* @generated SignedSource<<b23c000829cbdeed95b891ed561843c9>>
*/

"use strict";
Expand Down Expand Up @@ -9755,10 +9755,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1381 = {
bundleType: 0,
version: "19.1.0-native-fb-e06c72fc-20241215",
version: "19.1.0-native-fb-909ed63e-20241216",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-e06c72fc-20241215"
reconcilerVersion: "19.1.0-native-fb-909ed63e-20241216"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1382 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -9894,4 +9894,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.1.0-native-fb-e06c72fc-20241215";
exports.version = "19.1.0-native-fb-909ed63e-20241216";
Loading

0 comments on commit ec257f2

Please sign in to comment.