Skip to content

Commit bf9385a

Browse files
committed
Prerender during same pass if blocked anyway (#30879)
If something suspends in the shell — i.e. we won't replace the suspended content with a fallback — we might as well prerender the siblings during the current render pass, instead of spawning a separate prerender pass. This is implemented by setting the "is prerendering" flag to true whenever we suspend in the shell. But only if we haven't already skipped over some siblings, because if so, then we need to schedule a separate prerender pass regardless. DiffTrain build for [66cf2cf](66cf2cf)
1 parent 4d30e52 commit bf9385a

34 files changed

+140
-86
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d160aa0fbb1bd2d00ea8c771c551c9cb5b47f1e9
1+
66cf2cfc8a8c4b09d2b783fd7302ae6b24150935
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d160aa0fbb1bd2d00ea8c771c551c9cb5b47f1e9
1+
66cf2cfc8a8c4b09d2b783fd7302ae6b24150935

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ __DEV__ &&
20012001
exports.useTransition = function () {
20022002
return resolveDispatcher().useTransition();
20032003
};
2004-
exports.version = "19.0.0-www-classic-d160aa0f-20240910";
2004+
exports.version = "19.0.0-www-classic-66cf2cfc-20240910";
20052005
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
20062006
"function" ===
20072007
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
@@ -1981,7 +1981,7 @@ __DEV__ &&
19811981
exports.useTransition = function () {
19821982
return resolveDispatcher().useTransition();
19831983
};
1984-
exports.version = "19.0.0-www-modern-d160aa0f-20240910";
1984+
exports.version = "19.0.0-www-modern-66cf2cfc-20240910";
19851985
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19861986
"function" ===
19871987
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
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-classic-d160aa0f-20240910";
668+
exports.version = "19.0.0-www-classic-66cf2cfc-20240910";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-modern-d160aa0f-20240910";
668+
exports.version = "19.0.0-www-modern-66cf2cfc-20240910";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-classic-d160aa0f-20240910";
672+
exports.version = "19.0.0-www-classic-66cf2cfc-20240910";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
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
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-modern-d160aa0f-20240910";
672+
exports.version = "19.0.0-www-modern-66cf2cfc-20240910";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12940,6 +12940,9 @@ __DEV__ &&
1294012940
}
1294112941
function renderDidSuspendDelayIfPossible() {
1294212942
workInProgressRootExitStatus = RootSuspendedWithDelay;
12943+
workInProgressRootDidSkipSuspendedSiblings ||
12944+
0 !== (workInProgressRootRenderLanes & 60) ||
12945+
(workInProgressRootIsPrerendering = !0);
1294312946
(0 === (workInProgressRootSkippedLanes & 134217727) &&
1294412947
0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
1294512948
null === workInProgressRoot ||
@@ -16964,11 +16967,11 @@ __DEV__ &&
1696416967
(function () {
1696516968
var internals = {
1696616969
bundleType: 1,
16967-
version: "19.0.0-www-classic-d160aa0f-20240910",
16970+
version: "19.0.0-www-classic-66cf2cfc-20240910",
1696816971
rendererPackageName: "react-art",
1696916972
currentDispatcherRef: ReactSharedInternals,
1697016973
findFiberByHostInstance: getInstanceFromNode,
16971-
reconcilerVersion: "19.0.0-www-classic-d160aa0f-20240910"
16974+
reconcilerVersion: "19.0.0-www-classic-66cf2cfc-20240910"
1697216975
};
1697316976
internals.overrideHookState = overrideHookState;
1697416977
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17002,7 +17005,7 @@ __DEV__ &&
1700217005
exports.Shape = Shape;
1700317006
exports.Surface = Surface;
1700417007
exports.Text = Text;
17005-
exports.version = "19.0.0-www-classic-d160aa0f-20240910";
17008+
exports.version = "19.0.0-www-classic-66cf2cfc-20240910";
1700617009
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1700717010
"function" ===
1700817011
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12488,6 +12488,9 @@ __DEV__ &&
1248812488
}
1248912489
function renderDidSuspendDelayIfPossible() {
1249012490
workInProgressRootExitStatus = RootSuspendedWithDelay;
12491+
workInProgressRootDidSkipSuspendedSiblings ||
12492+
0 !== (workInProgressRootRenderLanes & 60) ||
12493+
(workInProgressRootIsPrerendering = !0);
1249112494
(0 === (workInProgressRootSkippedLanes & 134217727) &&
1249212495
0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
1249312496
null === workInProgressRoot ||
@@ -16410,11 +16413,11 @@ __DEV__ &&
1641016413
(function () {
1641116414
var internals = {
1641216415
bundleType: 1,
16413-
version: "19.0.0-www-modern-d160aa0f-20240910",
16416+
version: "19.0.0-www-modern-66cf2cfc-20240910",
1641416417
rendererPackageName: "react-art",
1641516418
currentDispatcherRef: ReactSharedInternals,
1641616419
findFiberByHostInstance: getInstanceFromNode,
16417-
reconcilerVersion: "19.0.0-www-modern-d160aa0f-20240910"
16420+
reconcilerVersion: "19.0.0-www-modern-66cf2cfc-20240910"
1641816421
};
1641916422
internals.overrideHookState = overrideHookState;
1642016423
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16448,7 +16451,7 @@ __DEV__ &&
1644816451
exports.Shape = Shape;
1644916452
exports.Surface = Surface;
1645016453
exports.Text = Text;
16451-
exports.version = "19.0.0-www-modern-d160aa0f-20240910";
16454+
exports.version = "19.0.0-www-modern-66cf2cfc-20240910";
1645216455
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1645316456
"function" ===
1645416457
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)