27
transitionLaneExpirationMs,
28
retryLaneExpirationMs,
29
disableLegacyMode,
30
+ enableSiblingPrerendering,
31
} from 'shared/ReactFeatureFlags';
32
import {isDevToolsPresent} from './ReactFiberDevToolsHook';
33
import {clz32} from './clz32';
271
if (nonIdlePingedLanes !== NoLanes) {
272
nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
273
} else {
273
- // Nothing has been pinged. Check for lanes that need to be prewarmed.
274
- if (!rootHasPendingCommit) {
275
- const lanesToPrewarm = nonIdlePendingLanes & ~warmLanes;
276
- if (lanesToPrewarm !== NoLanes) {
277
- nextLanes = getHighestPriorityLanes(lanesToPrewarm);
274
+ if (enableSiblingPrerendering) {
275
+ // Nothing has been pinged. Check for lanes that need to be prewarmed.
276
+ if (!rootHasPendingCommit) {
277
+ const lanesToPrewarm = nonIdlePendingLanes & ~warmLanes;
278
+ if (lanesToPrewarm !== NoLanes) {
279
+ nextLanes = getHighestPriorityLanes(lanesToPrewarm);
280
+ }
281
}
282
}
283
}
297
if (pingedLanes !== NoLanes) {
298
nextLanes = getHighestPriorityLanes(pingedLanes);
299
} else {
297
- // Nothing has been pinged. Check for lanes that need to be prewarmed.
298
- if (!rootHasPendingCommit) {
299
- const lanesToPrewarm = pendingLanes & ~warmLanes;
300
- if (lanesToPrewarm !== NoLanes) {
301
- nextLanes = getHighestPriorityLanes(lanesToPrewarm);
300
+ if (enableSiblingPrerendering) {
301
+ // Nothing has been pinged. Check for lanes that need to be prewarmed.
302
+ if (!rootHasPendingCommit) {
303
+ const lanesToPrewarm = pendingLanes & ~warmLanes;
304
+ if (lanesToPrewarm !== NoLanes) {
305
+ nextLanes = getHighestPriorityLanes(lanesToPrewarm);
306
+ }
307
}
308
}
309
}
770
root.suspendedLanes |= suspendedLanes;
771
root.pingedLanes &= ~suspendedLanes;
772
768
- if (!didSkipSuspendedSiblings) {
773
+ if (enableSiblingPrerendering && !didSkipSuspendedSiblings) {
774
// Mark these lanes as warm so we know there's nothing else to work on.
775
root.warmLanes |= suspendedLanes;
776
} else {
881
// suspended) instead of the regular mode (i.e. unwind and skip the siblings
882
// as soon as something suspends to unblock the rest of the update).
883
if (
884
+ enableSiblingPrerendering &&
885
suspendedRetryLanes !== NoLanes &&
886
// Note that we only do this if there were no updates since we started
887
// rendering. This mirrors the logic in markRootUpdated — whenever we