Skip to content

Commit 4c54509

Browse files
committed
[Fizz][Float] Refactor Resources (#27400)
Refactors Resources to have a more compact and memory efficient struture. Resources generally are just an Array of chunks. A resource is flushed when it's chunks is length zero. A resource does not have any other state. Stylesheets and Style tags are different and have been modeled as a unit as a StyleQueue. This object stores the style rules to flush as part of style tags using precedence as well as all the stylesheets associated with the precedence. Stylesheets still need to track state because it affects how we issue boundary completion instructions. Additionally stylesheets encode chunks lazily because we may never write them as html if they are discovered late. The preload props transfer is now maximally compact (only stores the props we would ever actually adopt) and only stores props for stylesheets and scripts because other preloads have no resource counterpart to adopt props into. The ResumableState maps that track which keys have been observed are being overloaded. Previously if a key was found it meant that a resource already exists (either in this render or in a prior prerender). Now we discriminate between null and object values. If map value is null we can assume the resource exists but if it is an object that represents a prior preload for that resource and the resource must still be constructed. DiffTrain build for commit 49eba01.
1 parent 10ae24a commit 4c54509

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23985,7 +23985,7 @@ function createFiberRoot(
2398523985
return root;
2398623986
}
2398723987

23988-
var ReactVersion = "18.3.0-canary-bff6be8eb-20230925";
23988+
var ReactVersion = "18.3.0-canary-49eba0193-20230926";
2398923989

2399023990
// Might add PROFILE later.
2399123991

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8620,7 +8620,7 @@ var devToolsConfig$jscomp$inline_1027 = {
86208620
throw Error("TestRenderer does not support findFiberByHostInstance()");
86218621
},
86228622
bundleType: 0,
8623-
version: "18.3.0-canary-bff6be8eb-20230925",
8623+
version: "18.3.0-canary-49eba0193-20230926",
86248624
rendererPackageName: "react-test-renderer"
86258625
};
86268626
var internals$jscomp$inline_1226 = {
@@ -8651,7 +8651,7 @@ var internals$jscomp$inline_1226 = {
86518651
scheduleRoot: null,
86528652
setRefreshHandler: null,
86538653
getCurrentFiber: null,
8654-
reconcilerVersion: "18.3.0-canary-bff6be8eb-20230925"
8654+
reconcilerVersion: "18.3.0-canary-49eba0193-20230926"
86558655
};
86568656
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
86578657
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9046,7 +9046,7 @@ var devToolsConfig$jscomp$inline_1069 = {
90469046
throw Error("TestRenderer does not support findFiberByHostInstance()");
90479047
},
90489048
bundleType: 0,
9049-
version: "18.3.0-canary-bff6be8eb-20230925",
9049+
version: "18.3.0-canary-49eba0193-20230926",
90509050
rendererPackageName: "react-test-renderer"
90519051
};
90529052
var internals$jscomp$inline_1267 = {
@@ -9077,7 +9077,7 @@ var internals$jscomp$inline_1267 = {
90779077
scheduleRoot: null,
90789078
setRefreshHandler: null,
90799079
getCurrentFiber: null,
9080-
reconcilerVersion: "18.3.0-canary-bff6be8eb-20230925"
9080+
reconcilerVersion: "18.3.0-canary-49eba0193-20230926"
90819081
};
90829082
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90839083
var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-bff6be8eb-20230925";
30+
var ReactVersion = "18.3.0-canary-49eba0193-20230926";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
616616
exports.useTransition = function () {
617617
return ReactCurrentDispatcher.current.useTransition();
618618
};
619-
exports.version = "18.3.0-canary-bff6be8eb-20230925";
619+
exports.version = "18.3.0-canary-49eba0193-20230926";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
619619
exports.useTransition = function () {
620620
return ReactCurrentDispatcher.current.useTransition();
621621
};
622-
exports.version = "18.3.0-canary-bff6be8eb-20230925";
622+
exports.version = "18.3.0-canary-49eba0193-20230926";
623623

624624
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
625625
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bff6be8eb1d77980c13f3e01be63cb813a377058
1+
49eba01930e9e1f331b34967fca65d5a0ba62846

0 commit comments

Comments
 (0)