Skip to content

Commit 2d8e7f1

Browse files
authored
[flags] Remove enableHydrationLaneScheduling (#35549)
This is just a killswitch and has been on for over a year #31751
1 parent 6a0ab4d commit 2d8e7f1

10 files changed

+3
-23
lines changed

packages/react-dom/src/__tests__/ReactDOMFizzShellHydration-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ describe('ReactDOMFizzShellHydration', () => {
255255
},
256256
);
257257

258-
// @gate enableHydrationLaneScheduling
259258
it(
260259
'updating the root at same priority as initial hydration does not ' +
261260
'force a client render',

packages/react-reconciler/src/ReactFiberBeginWork.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ import {
117117
enableLegacyHidden,
118118
enableCPUSuspense,
119119
disableLegacyMode,
120-
enableHydrationLaneScheduling,
121120
enableViewTransition,
122121
enableFragmentRefs,
123122
} from 'shared/ReactFeatureFlags';
@@ -155,7 +154,6 @@ import {
155154
NoLanes,
156155
OffscreenLane,
157156
DefaultLane,
158-
DefaultHydrationLane,
159157
SomeRetryLane,
160158
includesSomeLane,
161159
includesOnlyRetries,
@@ -2919,9 +2917,7 @@ function mountDehydratedSuspenseComponent(
29192917
// wrong priority associated with it and will prevent hydration of parent path.
29202918
// Instead, we'll leave work left on it to render it in a separate commit.
29212919
// Schedule a normal pri update to render this content.
2922-
workInProgress.lanes = laneToLanes(
2923-
enableHydrationLaneScheduling ? DefaultLane : DefaultHydrationLane,
2924-
);
2920+
workInProgress.lanes = laneToLanes(DefaultLane);
29252921
} else {
29262922
// We'll continue hydrating the rest at offscreen priority since we'll already
29272923
// be showing the right content coming from the server, it is no rush.

packages/react-reconciler/src/ReactFiberReconciler.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import getComponentNameFromFiber from 'react-reconciler/src/getComponentNameFrom
4242
import isArray from 'shared/isArray';
4343
import {
4444
enableSchedulingProfiler,
45-
enableHydrationLaneScheduling,
4645
disableLegacyMode,
4746
} from 'shared/ReactFeatureFlags';
4847
import ReactSharedInternals from 'shared/ReactSharedInternals';
@@ -340,9 +339,7 @@ export function createHydrationContainer(
340339
// enqueue the callback if one is provided).
341340
const current = root.current;
342341
let lane = requestUpdateLane(current);
343-
if (enableHydrationLaneScheduling) {
344-
lane = getBumpedLaneForHydrationByLane(lane);
345-
}
342+
lane = getBumpedLaneForHydrationByLane(lane);
346343
const update = createUpdate(lane);
347344
update.callback =
348345
callback !== undefined && callback !== null ? callback : null;
@@ -557,9 +554,7 @@ export function attemptHydrationAtCurrentPriority(fiber: Fiber): void {
557554
return;
558555
}
559556
let lane = requestUpdateLane(fiber);
560-
if (enableHydrationLaneScheduling) {
561-
lane = getBumpedLaneForHydrationByLane(lane);
562-
}
557+
lane = getBumpedLaneForHydrationByLane(lane);
563558
const root = enqueueConcurrentRenderForLane(fiber, lane);
564559
if (root !== null) {
565560
scheduleUpdateOnFiber(root, fiber, lane);

packages/shared/ReactFeatureFlags.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
// when it rolls out to prod. We should remove these as soon as possible.
2323
// -----------------------------------------------------------------------------
2424

25-
export const enableHydrationLaneScheduling: boolean = true;
26-
2725
// -----------------------------------------------------------------------------
2826
// Land or remove (moderate effort)
2927
//

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export const enableUpdaterTracking: boolean = __PROFILE__;
6767
export const retryLaneExpirationMs = 5000;
6868
export const syncLaneExpirationMs = 250;
6969
export const transitionLaneExpirationMs = 5000;
70-
export const enableHydrationLaneScheduling: boolean = true;
7170
export const enableYieldingBeforePassive: boolean = false;
7271
export const enableThrottledScheduling: boolean = false;
7372
export const enableViewTransition: boolean = false;

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const renameElementSymbol: boolean = true;
5656
export const retryLaneExpirationMs = 5000;
5757
export const syncLaneExpirationMs = 250;
5858
export const transitionLaneExpirationMs = 5000;
59-
export const enableHydrationLaneScheduling: boolean = true;
6059

6160
export const enableYieldingBeforePassive: boolean = false;
6261

packages/shared/forks/ReactFeatureFlags.test-renderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const enableNoCloningMemoCache: boolean = false;
3535
export const enableLegacyFBSupport: boolean = false;
3636
export const enableMoveBefore: boolean = false;
3737
export const enableHiddenSubtreeInsertionEffectCleanup: boolean = false;
38-
export const enableHydrationLaneScheduling: boolean = true;
3938

4039
export const enableRetryLaneExpiration: boolean = false;
4140
export const retryLaneExpirationMs = 5000;

packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export const renameElementSymbol = false;
5454
export const retryLaneExpirationMs = 5000;
5555
export const syncLaneExpirationMs = 250;
5656
export const transitionLaneExpirationMs = 5000;
57-
export const enableHydrationLaneScheduling = true;
5857
export const enableYieldingBeforePassive = false;
5958
export const enableThrottledScheduling = false;
6059
export const enableViewTransition = false;

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ export const renameElementSymbol: boolean = false;
6565
export const enableObjectFiber: boolean = false;
6666
export const enableEagerAlternateStateNodeCleanup: boolean = true;
6767

68-
export const enableHydrationLaneScheduling: boolean = true;
69-
7068
export const enableYieldingBeforePassive: boolean = false;
7169

7270
export const enableThrottledScheduling: boolean = false;

packages/shared/forks/ReactFeatureFlags.www.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ export const enableYieldingBeforePassive: boolean = false;
5757

5858
export const enableThrottledScheduling: boolean = false;
5959

60-
export const enableHydrationLaneScheduling: boolean = true;
61-
6260
export const enablePerformanceIssueReporting: boolean = false;
6361

6462
// Logs additional User Timing API marks for use with an experimental profiling tool.

0 commit comments

Comments
 (0)