@@ -36,10 +36,7 @@ export type Lane = number;
36
36
export type LaneMap < T > = Array < T > ;
37
37
38
38
import invariant from 'shared/invariant' ;
39
- import {
40
- enableCache ,
41
- enableTransitionEntanglement ,
42
- } from 'shared/ReactFeatureFlags' ;
39
+ import { enableCache } from 'shared/ReactFeatureFlags' ;
43
40
44
41
import {
45
42
ImmediatePriority as ImmediateSchedulerPriority ,
@@ -309,15 +306,6 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
309
306
return NoLanes ;
310
307
}
311
308
312
- if ( enableTransitionEntanglement ) {
313
- // We don't need to do anything extra here, because we apply per-lane
314
- // transition entanglement in the entanglement loop below.
315
- } else {
316
- // If there are higher priority lanes, we'll include them even if they
317
- // are suspended.
318
- nextLanes = pendingLanes & getEqualOrHigherPriorityLanes ( nextLanes ) ;
319
- }
320
-
321
309
// If we're already in the middle of a render, switching lanes will interrupt
322
310
// it and we'll lose our progress. We should only do this if the new lanes are
323
311
// higher priority.
@@ -676,39 +664,21 @@ export function markRootUpdated(
676
664
) {
677
665
root . pendingLanes |= updateLane ;
678
666
679
- // TODO: Theoretically, any update to any lane can unblock any other lane. But
680
- // it's not practical to try every single possible combination. We need a
681
- // heuristic to decide which lanes to attempt to render, and in which batches.
682
- // For now, we use the same heuristic as in the old ExpirationTimes model:
683
- // retry any lane at equal or lower priority, but don't try updates at higher
684
- // priority without also including the lower priority updates. This works well
685
- // when considering updates across different priority levels, but isn't
686
- // sufficient for updates within the same priority, since we want to treat
687
- // those updates as parallel.
688
-
689
- // Unsuspend any update at equal or lower priority.
690
- const higherPriorityLanes = updateLane - 1 ; // Turns 0b1000 into 0b0111
691
-
692
- if ( enableTransitionEntanglement ) {
693
- // If there are any suspended transitions, it's possible this new update
694
- // could unblock them. Clear the suspended lanes so that we can try rendering
695
- // them again.
696
- //
697
- // TODO: We really only need to unsuspend only lanes that are in the
698
- // `subtreeLanes` of the updated fiber, or the update lanes of the return
699
- // path. This would exclude suspended updates in an unrelated sibling tree,
700
- // since there's no way for this update to unblock it.
701
- //
702
- // We don't do this if the incoming update is idle, because we never process
703
- // idle updates until after all the regular updates have finished; there's no
704
- // way it could unblock a transition.
705
- if ( ( updateLane & IdleLanes ) === NoLanes ) {
706
- root . suspendedLanes = NoLanes ;
707
- root . pingedLanes = NoLanes ;
708
- }
709
- } else {
710
- root . suspendedLanes &= higherPriorityLanes ;
711
- root . pingedLanes &= higherPriorityLanes ;
667
+ // If there are any suspended transitions, it's possible this new update
668
+ // could unblock them. Clear the suspended lanes so that we can try rendering
669
+ // them again.
670
+ //
671
+ // TODO: We really only need to unsuspend only lanes that are in the
672
+ // `subtreeLanes` of the updated fiber, or the update lanes of the return
673
+ // path. This would exclude suspended updates in an unrelated sibling tree,
674
+ // since there's no way for this update to unblock it.
675
+ //
676
+ // We don't do this if the incoming update is idle, because we never process
677
+ // idle updates until after all the regular updates have finished; there's no
678
+ // way it could unblock a transition.
679
+ if ( ( updateLane & IdleLanes ) === NoLanes ) {
680
+ root . suspendedLanes = NoLanes ;
681
+ root . pingedLanes = NoLanes ;
712
682
}
713
683
714
684
const eventTimes = root . eventTimes ;
0 commit comments