Skip to content

Commit c84ead8

Browse files
committed
[Fizz] Enable the progressiveChunkSize option (facebook#33027)
Since the very beginning we have had the `progressiveChunkSize` option but we never actually took advantage of it because we didn't count the bytes that we emitted. This starts counting the bytes by taking a pass over the added chunks each time a segment completes. That allows us to outline a Suspense boundary to stream in late even if it is already loaded by the time that back-pressure flow and in a `prerender`. Meaning it gets inserted with script. The effect can be seen in the fixture where if you have large HTML content that can block initial paint (thanks to [`rel="expect"`](facebook#33016) but also nested Suspense boundaries). Before this fix, the paint would be blocked until the large content loaded. This lets us paint the fallback first in the case that the raw bytes of the content takes a while to download. You can set it to `Infinity` to opt-out. E.g. if you want to ensure there's never any scripts. It's always set to `Infinity` in `renderToHTML` and the legacy `renderToString`. One downside is that if we might choose to outline a boundary, we need to let its fallback complete. We don't currently discount the size of the fallback but really just consider them additive even though in theory the fallback itself could also add significant size or even more than the content. It should maybe really be considered the delta but that would require us to track the size of the fallback separately which is tricky. One problem with the current heuristic is that we just consider the size of the boundary content itself down to the next boundary. If you have a lot of small boundaries adding up, it'll never kick in. I intend to address that in a follow up. DiffTrain build for [8e9a5fc](facebook@8e9a5fc)
1 parent 927f04e commit c84ead8

37 files changed

+4574
-4343
lines changed

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 4380 additions & 4180 deletions
Large diffs are not rendered by default.

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0c28a09eefaa0e70a313644fd8e455c8ab7ba3eb
1+
8e9a5fc6c1a6252ca1727ab8fe0d4ee13f2568ec
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0c28a09eefaa0e70a313644fd8e455c8ab7ba3eb
1+
8e9a5fc6c1a6252ca1727ab8fe0d4ee13f2568ec

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-classic-0c28a09e-20250425";
1541+
exports.version = "19.2.0-www-classic-8e9a5fc6-20250425";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
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
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-modern-0c28a09e-20250425";
1541+
exports.version = "19.2.0-www-modern-8e9a5fc6-20250425";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
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
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-classic-0c28a09e-20250425";
639+
exports.version = "19.2.0-www-classic-8e9a5fc6-20250425";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-modern-0c28a09e-20250425";
639+
exports.version = "19.2.0-www-modern-8e9a5fc6-20250425";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-classic-0c28a09e-20250425";
643+
exports.version = "19.2.0-www-classic-8e9a5fc6-20250425";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
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
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-modern-0c28a09e-20250425";
643+
exports.version = "19.2.0-www-modern-8e9a5fc6-20250425";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18800,10 +18800,10 @@ __DEV__ &&
1880018800
(function () {
1880118801
var internals = {
1880218802
bundleType: 1,
18803-
version: "19.2.0-www-classic-0c28a09e-20250425",
18803+
version: "19.2.0-www-classic-8e9a5fc6-20250425",
1880418804
rendererPackageName: "react-art",
1880518805
currentDispatcherRef: ReactSharedInternals,
18806-
reconcilerVersion: "19.2.0-www-classic-0c28a09e-20250425"
18806+
reconcilerVersion: "19.2.0-www-classic-8e9a5fc6-20250425"
1880718807
};
1880818808
internals.overrideHookState = overrideHookState;
1880918809
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18837,7 +18837,7 @@ __DEV__ &&
1883718837
exports.Shape = Shape;
1883818838
exports.Surface = Surface;
1883918839
exports.Text = Text;
18840-
exports.version = "19.2.0-www-classic-0c28a09e-20250425";
18840+
exports.version = "19.2.0-www-classic-8e9a5fc6-20250425";
1884118841
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1884218842
"function" ===
1884318843
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)