@samitouri / QOS-React-2 / commits / 3b870b1e09

Lane enableTransitionEntanglement flag (#20775)

Andrew Clark committed Feb 10, 2021 at 02:25 UTC 3b870b1e0912c076c450bee261d8dbb181de673c
17 files changed +84 -353
packages/react-reconciler/src/ReactFiberLane.new.js
+24 -85
@@ -38,7 +38,6 @@ export type LaneMap<T> = Array<T>;
38 import invariant from 'shared/invariant';
39 import {
40 enableCache,
41 - enableTransitionEntanglement,
41 enableNonInterruptingNormalPri,
42 } from 'shared/ReactFeatureFlags';
43
@@ -509,93 +508,33 @@ export function isTransitionLane(lane: Lane) {
508
509 // To ensure consistency across multiple updates in the same event, this should
510 // be a pure function, so that it always returns the same lane for given inputs.
512 -export function findUpdateLane(
513 - lanePriority: LanePriority,
514 - wipLanes: Lanes,
515 -): Lane {
516 - if (enableTransitionEntanglement) {
517 - // Ignore wipLanes. Always assign to the same bit per priority.
518 - switch (lanePriority) {
519 - case NoLanePriority:
520 - break;
521 - case SyncLanePriority:
522 - return SyncLane;
523 - case SyncBatchedLanePriority:
524 - return SyncBatchedLane;
525 - case InputDiscreteLanePriority: {
526 - return pickArbitraryLane(InputDiscreteLanes);
527 - }
528 - case InputContinuousLanePriority: {
529 - return pickArbitraryLane(InputContinuousLanes);
530 - }
531 - case DefaultLanePriority: {
532 - return pickArbitraryLane(DefaultLanes);
533 - }
534 - case TransitionPriority: // Should be handled by findTransitionLane instead
535 - case RetryLanePriority: // Should be handled by findRetryLane instead
536 - break;
537 - case IdleLanePriority:
538 - return pickArbitraryLane(IdleLanes);
539 - default:
540 - // The remaining priorities are not valid for updates
541 - break;
511 +export function findUpdateLane(lanePriority: LanePriority): Lane {
512 + switch (lanePriority) {
513 + case NoLanePriority:
514 + break;
515 + case SyncLanePriority:
516 + return SyncLane;
517 + case SyncBatchedLanePriority:
518 + return SyncBatchedLane;
519 + case InputDiscreteLanePriority: {
520 + return pickArbitraryLane(InputDiscreteLanes);
521 }
543 - } else {
544 - // Old behavior that uses wipLanes to shift interleaved updates into a
545 - // separate lane. This is no longer needed because we put interleaved
546 - // updates on a special queue.
547 - switch (lanePriority) {
548 - case NoLanePriority:
549 - break;
550 - case SyncLanePriority:
551 - return SyncLane;
552 - case SyncBatchedLanePriority:
553 - return SyncBatchedLane;
554 - case InputDiscreteLanePriority: {
555 - const lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
556 - if (lane === NoLane) {
557 - // Shift to the next priority level
558 - return findUpdateLane(InputContinuousLanePriority, wipLanes);
559 - }
560 - return lane;
561 - }
562 - case InputContinuousLanePriority: {
563 - const lane = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
564 - if (lane === NoLane) {
565 - // Shift to the next priority level
566 - return findUpdateLane(DefaultLanePriority, wipLanes);
567 - }
568 - return lane;
569 - }
570 - case DefaultLanePriority: {
571 - let lane = pickArbitraryLane(DefaultLanes & ~wipLanes);
572 - if (lane === NoLane) {
573 - // If all the default lanes are already being worked on, look for a
574 - // lane in the transition range.
575 - lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
576 - if (lane === NoLane) {
577 - // All the transition lanes are taken, too. This should be very
578 - // rare, but as a last resort, pick a default lane. This will have
579 - // the effect of interrupting the current work-in-progress render.
580 - lane = pickArbitraryLane(DefaultLanes);
581 - }
582 - }
583 - return lane;
584 - }
585 - case TransitionPriority: // Should be handled by findTransitionLane instead
586 - case RetryLanePriority: // Should be handled by findRetryLane instead
587 - break;
588 - case IdleLanePriority:
589 - let lane = pickArbitraryLane(IdleLanes & ~wipLanes);
590 - if (lane === NoLane) {
591 - lane = pickArbitraryLane(IdleLanes);
592 - }
593 - return lane;
594 - default:
595 - // The remaining priorities are not valid for updates
596 - break;
522 + case InputContinuousLanePriority: {
523 + return pickArbitraryLane(InputContinuousLanes);
524 }
525 + case DefaultLanePriority: {
526 + return pickArbitraryLane(DefaultLanes);
527 + }
528 + case TransitionPriority: // Should be handled by findTransitionLane instead
529 + case RetryLanePriority: // Should be handled by findRetryLane instead
530 + break;
531 + case IdleLanePriority:
532 + return pickArbitraryLane(IdleLanes);
533 + default:
534 + // The remaining priorities are not valid for updates
535 + break;
536 }
537 +
538 invariant(
539 false,
540 'Invalid update priority: %s. This is a bug in React.',
packages/react-reconciler/src/ReactFiberLane.old.js
+24 -85
@@ -38,7 +38,6 @@ export type LaneMap<T> = Array<T>;
38 import invariant from 'shared/invariant';
39 import {
40 enableCache,
41 - enableTransitionEntanglement,
41 enableNonInterruptingNormalPri,
42 } from 'shared/ReactFeatureFlags';
43
@@ -509,93 +508,33 @@ export function isTransitionLane(lane: Lane) {
508
509 // To ensure consistency across multiple updates in the same event, this should
510 // be a pure function, so that it always returns the same lane for given inputs.
512 -export function findUpdateLane(
513 - lanePriority: LanePriority,
514 - wipLanes: Lanes,
515 -): Lane {
516 - if (enableTransitionEntanglement) {
517 - // Ignore wipLanes. Always assign to the same bit per priority.
518 - switch (lanePriority) {
519 - case NoLanePriority:
520 - break;
521 - case SyncLanePriority:
522 - return SyncLane;
523 - case SyncBatchedLanePriority:
524 - return SyncBatchedLane;
525 - case InputDiscreteLanePriority: {
526 - return pickArbitraryLane(InputDiscreteLanes);
527 - }
528 - case InputContinuousLanePriority: {
529 - return pickArbitraryLane(InputContinuousLanes);
530 - }
531 - case DefaultLanePriority: {
532 - return pickArbitraryLane(DefaultLanes);
533 - }
534 - case TransitionPriority: // Should be handled by findTransitionLane instead
535 - case RetryLanePriority: // Should be handled by findRetryLane instead
536 - break;
537 - case IdleLanePriority:
538 - return pickArbitraryLane(IdleLanes);
539 - default:
540 - // The remaining priorities are not valid for updates
541 - break;
511 +export function findUpdateLane(lanePriority: LanePriority): Lane {
512 + switch (lanePriority) {
513 + case NoLanePriority:
514 + break;
515 + case SyncLanePriority:
516 + return SyncLane;
517 + case SyncBatchedLanePriority:
518 + return SyncBatchedLane;
519 + case InputDiscreteLanePriority: {
520 + return pickArbitraryLane(InputDiscreteLanes);
521 }
543 - } else {
544 - // Old behavior that uses wipLanes to shift interleaved updates into a
545 - // separate lane. This is no longer needed because we put interleaved
546 - // updates on a special queue.
547 - switch (lanePriority) {
548 - case NoLanePriority:
549 - break;
550 - case SyncLanePriority:
551 - return SyncLane;
552 - case SyncBatchedLanePriority:
553 - return SyncBatchedLane;
554 - case InputDiscreteLanePriority: {
555 - const lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
556 - if (lane === NoLane) {
557 - // Shift to the next priority level
558 - return findUpdateLane(InputContinuousLanePriority, wipLanes);
559 - }
560 - return lane;
561 - }
562 - case InputContinuousLanePriority: {
563 - const lane = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
564 - if (lane === NoLane) {
565 - // Shift to the next priority level
566 - return findUpdateLane(DefaultLanePriority, wipLanes);
567 - }
568 - return lane;
569 - }
570 - case DefaultLanePriority: {
571 - let lane = pickArbitraryLane(DefaultLanes & ~wipLanes);
572 - if (lane === NoLane) {
573 - // If all the default lanes are already being worked on, look for a
574 - // lane in the transition range.
575 - lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
576 - if (lane === NoLane) {
577 - // All the transition lanes are taken, too. This should be very
578 - // rare, but as a last resort, pick a default lane. This will have
579 - // the effect of interrupting the current work-in-progress render.
580 - lane = pickArbitraryLane(DefaultLanes);
581 - }
582 - }
583 - return lane;
584 - }
585 - case TransitionPriority: // Should be handled by findTransitionLane instead
586 - case RetryLanePriority: // Should be handled by findRetryLane instead
587 - break;
588 - case IdleLanePriority:
589 - let lane = pickArbitraryLane(IdleLanes & ~wipLanes);
590 - if (lane === NoLane) {
591 - lane = pickArbitraryLane(IdleLanes);
592 - }
593 - return lane;
594 - default:
595 - // The remaining priorities are not valid for updates
596 - break;
522 + case InputContinuousLanePriority: {
523 + return pickArbitraryLane(InputContinuousLanes);
524 }
525 + case DefaultLanePriority: {
526 + return pickArbitraryLane(DefaultLanes);
527 + }
528 + case TransitionPriority: // Should be handled by findTransitionLane instead
529 + case RetryLanePriority: // Should be handled by findRetryLane instead
530 + break;
531 + case IdleLanePriority:
532 + return pickArbitraryLane(IdleLanes);
533 + default:
534 + // The remaining priorities are not valid for updates
535 + break;
536 }
537 +
538 invariant(
539 false,
540 'Invalid update priority: %s. This is a bug in React.',
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+5 -39
@@ -34,7 +34,6 @@ import {
34 disableSchedulerTimeoutInWorkLoop,
35 enableDoubleInvokingEffects,
36 skipUnmountedBoundaries,
37 - enableTransitionEntanglement,
37 enableNativeEventPriorityInference,
38 } from 'shared/ReactFeatureFlags';
39 import ReactSharedInternals from 'shared/ReactSharedInternals';
@@ -455,22 +454,22 @@ export function requestUpdateLane(fiber: Fiber): Lane {
454 (executionContext & DiscreteEventContext) !== NoContext &&
455 schedulerPriority === UserBlockingSchedulerPriority
456 ) {
458 - lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
457 + lane = findUpdateLane(InputDiscreteLanePriority);
458 } else if (
459 decoupleUpdatePriorityFromScheduler &&
460 getCurrentUpdateLanePriority() !== NoLanePriority
461 ) {
462 const currentLanePriority = getCurrentUpdateLanePriority();
464 - lane = findUpdateLane(currentLanePriority, currentEventWipLanes);
463 + lane = findUpdateLane(currentLanePriority);
464 } else {
465 if (enableNativeEventPriorityInference) {
466 const eventLanePriority = getCurrentEventPriority();
468 - lane = findUpdateLane(eventLanePriority, currentEventWipLanes);
467 + lane = findUpdateLane(eventLanePriority);
468 } else {
469 const schedulerLanePriority = schedulerPriorityToLanePriority(
470 schedulerPriority,
471 );
473 - lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
472 + lane = findUpdateLane(schedulerLanePriority);
473 }
474 }
475
@@ -837,22 +836,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
836 }
837
838 let exitStatus = renderRootConcurrent(root, lanes);
840 -
841 - if (
842 - !enableTransitionEntanglement &&
843 - includesSomeLane(
844 - workInProgressRootIncludedLanes,
845 - workInProgressRootUpdatedLanes,
846 - )
847 - ) {
848 - // The render included lanes that were updated during the render phase.
849 - // For example, when unhiding a hidden tree, we include all the lanes
850 - // that were previously skipped when the tree was hidden. That set of
851 - // lanes is a superset of the lanes we started rendering with.
852 - //
853 - // So we'll throw out the current work and restart.
854 - prepareFreshStack(root, NoLanes);
855 - } else if (exitStatus !== RootIncomplete) {
839 + if (exitStatus !== RootIncomplete) {
840 if (exitStatus === RootErrored) {
841 executionContext |= RetryAfterError;
842
@@ -1044,24 +1028,6 @@ function performSyncWorkOnRoot(root) {
1028 // rendering it before rendering the rest of the expired work.
1029 lanes = workInProgressRootRenderLanes;
1030 exitStatus = renderRootSync(root, lanes);
1047 - if (
1048 - !enableTransitionEntanglement &&
1049 - includesSomeLane(
1050 - workInProgressRootIncludedLanes,
1051 - workInProgressRootUpdatedLanes,
1052 - )
1053 - ) {
1054 - // The render included lanes that were updated during the render phase.
1055 - // For example, when unhiding a hidden tree, we include all the lanes
1056 - // that were previously skipped when the tree was hidden. That set of
1057 - // lanes is a superset of the lanes we started rendering with.
1058 - //
1059 - // Note that this only happens when part of the tree is rendered
1060 - // concurrently. If the whole tree is rendered synchronously, then there
1061 - // are no interleaved events.
1062 - lanes = getNextLanes(root, lanes);
1063 - exitStatus = renderRootSync(root, lanes);
1064 - }
1031 } else {
1032 lanes = getNextLanes(root, NoLanes);
1033 exitStatus = renderRootSync(root, lanes);
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+5 -39
@@ -34,7 +34,6 @@ import {
34 disableSchedulerTimeoutInWorkLoop,
35 enableDoubleInvokingEffects,
36 skipUnmountedBoundaries,
37 - enableTransitionEntanglement,
37 enableNativeEventPriorityInference,
38 } from 'shared/ReactFeatureFlags';
39 import ReactSharedInternals from 'shared/ReactSharedInternals';
@@ -455,22 +454,22 @@ export function requestUpdateLane(fiber: Fiber): Lane {
454 (executionContext & DiscreteEventContext) !== NoContext &&
455 schedulerPriority === UserBlockingSchedulerPriority
456 ) {
458 - lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
457 + lane = findUpdateLane(InputDiscreteLanePriority);
458 } else if (
459 decoupleUpdatePriorityFromScheduler &&
460 getCurrentUpdateLanePriority() !== NoLanePriority
461 ) {
462 const currentLanePriority = getCurrentUpdateLanePriority();
464 - lane = findUpdateLane(currentLanePriority, currentEventWipLanes);
463 + lane = findUpdateLane(currentLanePriority);
464 } else {
465 if (enableNativeEventPriorityInference) {
466 const eventLanePriority = getCurrentEventPriority();
468 - lane = findUpdateLane(eventLanePriority, currentEventWipLanes);
467 + lane = findUpdateLane(eventLanePriority);
468 } else {
469 const schedulerLanePriority = schedulerPriorityToLanePriority(
470 schedulerPriority,
471 );
473 - lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
472 + lane = findUpdateLane(schedulerLanePriority);
473 }
474 }
475
@@ -837,22 +836,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
836 }
837
838 let exitStatus = renderRootConcurrent(root, lanes);
840 -
841 - if (
842 - !enableTransitionEntanglement &&
843 - includesSomeLane(
844 - workInProgressRootIncludedLanes,
845 - workInProgressRootUpdatedLanes,
846 - )
847 - ) {
848 - // The render included lanes that were updated during the render phase.
849 - // For example, when unhiding a hidden tree, we include all the lanes
850 - // that were previously skipped when the tree was hidden. That set of
851 - // lanes is a superset of the lanes we started rendering with.
852 - //
853 - // So we'll throw out the current work and restart.
854 - prepareFreshStack(root, NoLanes);
855 - } else if (exitStatus !== RootIncomplete) {
839 + if (exitStatus !== RootIncomplete) {
840 if (exitStatus === RootErrored) {
841 executionContext |= RetryAfterError;
842
@@ -1044,24 +1028,6 @@ function performSyncWorkOnRoot(root) {
1028 // rendering it before rendering the rest of the expired work.
1029 lanes = workInProgressRootRenderLanes;
1030 exitStatus = renderRootSync(root, lanes);
1047 - if (
1048 - !enableTransitionEntanglement &&
1049 - includesSomeLane(
1050 - workInProgressRootIncludedLanes,
1051 - workInProgressRootUpdatedLanes,
1052 - )
1053 - ) {
1054 - // The render included lanes that were updated during the render phase.
1055 - // For example, when unhiding a hidden tree, we include all the lanes
1056 - // that were previously skipped when the tree was hidden. That set of
1057 - // lanes is a superset of the lanes we started rendering with.
1058 - //
1059 - // Note that this only happens when part of the tree is rendered
1060 - // concurrently. If the whole tree is rendered synchronously, then there
1061 - // are no interleaved events.
1062 - lanes = getNextLanes(root, lanes);
1063 - exitStatus = renderRootSync(root, lanes);
1064 - }
1031 } else {
1032 lanes = getNextLanes(root, NoLanes);
1033 exitStatus = renderRootSync(root, lanes);
packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js
+13 -38
@@ -276,23 +276,12 @@ describe('DebugTracing', () => {
276 expect(Scheduler).toFlushUntilNextPaint([]);
277 }).toErrorDev('Cannot update during an existing state transition');
278
279 - gate(flags => {
280 - if (flags.new) {
281 - expect(logs).toEqual([
282 - 'group: ⚛️ render (0b0000000000000000000001000000000)',
283 - 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
284 - 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
285 - 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
286 - ]);
287 - } else {
288 - expect(logs).toEqual([
289 - 'group: ⚛️ render (0b0000000000000000000001000000000)',
290 - 'log: ⚛️ Example updated state (0b0000000000000000000010000000000)',
291 - 'log: ⚛️ Example updated state (0b0000000000000000000010000000000)',
292 - 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
293 - ]);
294 - }
295 - });
279 + expect(logs).toEqual([
280 + 'group: ⚛️ render (0b0000000000000000000001000000000)',
281 + 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
282 + 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
283 + 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
284 + ]);
285 });
286
287 // @gate experimental && build === 'development' && enableDebugTracing
@@ -327,9 +316,6 @@ describe('DebugTracing', () => {
316 ]);
317 });
318
330 - // This test is coupled to lane implementation details, so I'm disabling it
331 - // until it stabilizes so we don't have to repeatedly update it.
332 - // @gate !enableTransitionEntanglement
319 // @gate experimental && build === 'development' && enableDebugTracing
320 it('should log cascading passive updates', () => {
321 function Example() {
@@ -350,7 +336,7 @@ describe('DebugTracing', () => {
336 });
337 expect(logs).toEqual([
338 'group: ⚛️ passive effects (0b0000000000000000000001000000000)',
353 - 'log: ⚛️ Example updated state (0b0000000000000000000010000000000)',
339 + 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
340 'groupEnd: ⚛️ passive effects (0b0000000000000000000001000000000)',
341 ]);
342 });
@@ -374,23 +360,12 @@ describe('DebugTracing', () => {
360 );
361 });
362
377 - gate(flags => {
378 - if (flags.new) {
379 - expect(logs).toEqual([
380 - 'group: ⚛️ render (0b0000000000000000000001000000000)',
381 - 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
382 - 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)', // debugRenderPhaseSideEffectsForStrictMode
383 - 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
384 - ]);
385 - } else {
386 - expect(logs).toEqual([
387 - 'group: ⚛️ render (0b0000000000000000000001000000000)',
388 - 'log: ⚛️ Example updated state (0b0000000000000000000010000000000)',
389 - 'log: ⚛️ Example updated state (0b0000000000000000000010000000000)', // debugRenderPhaseSideEffectsForStrictMode
390 - 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
391 - ]);
392 - }
393 - });
363 + expect(logs).toEqual([
364 + 'group: ⚛️ render (0b0000000000000000000001000000000)',
365 + 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
366 + 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)', // debugRenderPhaseSideEffectsForStrictMode
367 + 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
368 + ]);
369 });
370
371 // @gate experimental && build === 'development' && enableDebugTracing
packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js
+7 -36
@@ -589,7 +589,8 @@ describe('ReactSuspenseWithNoopRenderer', () => {
589
590 // Note: This test was written to test a heuristic used in the expiration
591 // times model. Might not make sense in the new model.
592 - // @gate enableCache || enableTransitionEntanglement
592 + // TODO: This test doesn't over what it was originally designed to test.
593 + // Either rewrite or delete.
594 it('tries each subsequent level after suspending', async () => {
595 const root = ReactNoop.createRoot();
596
@@ -642,26 +643,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
643 root.render(<App step={4} shouldSuspend={false} />);
644 });
645
645 - if (gate(flags => flags.enableTransitionEntanglement)) {
646 - expect(Scheduler).toHaveYielded(['Sibling', 'Step 4']);
647 - } else {
648 - // Old implementation
649 - expect(Scheduler).toHaveYielded([
650 - 'Sibling',
651 -
652 - // NOTE: The final of the update got pushed into a lower priority range of
653 - // lanes, leading to the extra intermediate render. This is because when
654 - // we schedule the fourth update, we're already in the middle of rendering
655 - // the three others. Since there are only three lanes in the default
656 - // range, the fourth lane is shifted to slightly lower priority. This
657 - // could easily change when we tweak our batching heuristics. Ideally,
658 - // they'd all have default priority and render in a single batch.
659 - 'Suspend! [Step 3]',
660 - 'Sibling',
661 -
662 - 'Step 4',
663 - ]);
664 - }
646 + expect(Scheduler).toHaveYielded(['Sibling', 'Step 4']);
647 });
648
649 // @gate enableCache
@@ -2798,21 +2780,10 @@ describe('ReactSuspenseWithNoopRenderer', () => {
2780 foo.setState({suspend: false});
2781 });
2782
2801 - if (gate(flags => flags.enableTransitionEntanglement)) {
2802 - expect(Scheduler).toHaveYielded([
2803 - // First setState
2804 - 'Foo',
2805 - ]);
2806 - } else {
2807 - expect(Scheduler).toHaveYielded([
2808 - // First setState
2809 - 'Foo',
2810 - // Second setState. This update was scheduled while we were in the
2811 - // middle of rendering the previous update, so it was pushed to a separate
2812 - // batch to avoid invalidating the work-in-progress tree.
2813 - 'Foo',
2814 - ]);
2815 - }
2783 + expect(Scheduler).toHaveYielded([
2784 + // First setState
2785 + 'Foo',
2786 + ]);
2787 expect(root).toMatchRenderedOutput(<span prop="Foo" />);
2788 });
2789
packages/react-reconciler/src/__tests__/SchedulingProfiler-test.internal.js
+6 -19
@@ -399,11 +399,7 @@ describe('SchedulingProfiler', () => {
399 expect(Scheduler).toFlushUntilNextPaint([]);
400 }).toErrorDev('Cannot update during an existing state transition');
401
402 - gate(({old}) =>
403 - old
404 - ? expectMarksToContain('--schedule-state-update-1024-Example')
405 - : expectMarksToContain('--schedule-state-update-512-Example'),
406 - );
402 + expectMarksToContain('--schedule-state-update-512-Example');
403 });
404
405 // @gate enableSchedulingProfiler
@@ -431,11 +427,7 @@ describe('SchedulingProfiler', () => {
427 expect(Scheduler).toFlushUntilNextPaint([]);
428 }).toErrorDev('Cannot update during an existing state transition');
429
434 - gate(({old}) =>
435 - old
436 - ? expectMarksToContain('--schedule-forced-update-1024-Example')
437 - : expectMarksToContain('--schedule-forced-update-512-Example'),
438 - );
430 + expectMarksToContain('--schedule-forced-update-512-Example');
431 });
432
433 // @gate enableSchedulingProfiler
@@ -476,7 +468,6 @@ describe('SchedulingProfiler', () => {
468
469 // This test is coupled to lane implementation details, so I'm disabling it in
470 // the new fork until it stabilizes so we don't have to repeatedly update it.
479 - // @gate !enableTransitionEntanglement
471 // @gate enableSchedulingProfiler
472 it('should mark cascading passive updates', () => {
473 function Example() {
@@ -501,11 +492,11 @@ describe('SchedulingProfiler', () => {
492 '--layout-effects-stop',
493 '--commit-stop',
494 '--passive-effects-start-512',
504 - '--schedule-state-update-1024-Example',
495 + '--schedule-state-update-512-Example',
496 '--passive-effects-stop',
506 - '--render-start-1024',
497 + '--render-start-512',
498 '--render-stop',
508 - '--commit-start-1024',
499 + '--commit-start-512',
500 '--commit-stop',
501 ]);
502 });
@@ -524,10 +515,6 @@ describe('SchedulingProfiler', () => {
515 ReactTestRenderer.create(<Example />, {unstable_isConcurrent: true});
516 });
517
527 - gate(({old}) =>
528 - old
529 - ? expectMarksToContain('--schedule-state-update-1024-Example')
530 - : expectMarksToContain('--schedule-state-update-512-Example'),
531 - );
518 + expectMarksToContain('--schedule-state-update-512-Example');
519 });
520 });
packages/shared/ReactFeatureFlags.js
-3
@@ -147,9 +147,6 @@ export const enableRecursiveCommitTraversal = false;
147
148 export const disableSchedulerTimeoutInWorkLoop = false;
149
150 -// Experiment to simplify/improve how transitions are scheduled
151 -export const enableTransitionEntanglement = false;
152 -
150 export const enableNonInterruptingNormalPri = false;
151
152 export const enableDiscreteEventMicroTasks = false;
packages/shared/forks/ReactFeatureFlags.native-fb.js
-1
@@ -57,7 +57,6 @@ export const enableUseRefAccessWarning = false;
57
58 export const enableRecursiveCommitTraversal = false;
59 export const disableSchedulerTimeoutInWorkLoop = false;
60 -export const enableTransitionEntanglement = false;
60 export const enableNonInterruptingNormalPri = false;
61 export const enableDiscreteEventMicroTasks = false;
62 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.native-oss.js
-1
@@ -56,7 +56,6 @@ export const enableUseRefAccessWarning = false;
56
57 export const enableRecursiveCommitTraversal = false;
58 export const disableSchedulerTimeoutInWorkLoop = false;
59 -export const enableTransitionEntanglement = false;
59 export const enableNonInterruptingNormalPri = false;
60 export const enableDiscreteEventMicroTasks = false;
61 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.test-renderer.js
-1
@@ -56,7 +56,6 @@ export const enableUseRefAccessWarning = false;
56
57 export const enableRecursiveCommitTraversal = false;
58 export const disableSchedulerTimeoutInWorkLoop = false;
59 -export const enableTransitionEntanglement = false;
59 export const enableNonInterruptingNormalPri = false;
60 export const enableDiscreteEventMicroTasks = false;
61 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
-1
@@ -56,7 +56,6 @@ export const enableUseRefAccessWarning = false;
56
57 export const enableRecursiveCommitTraversal = false;
58 export const disableSchedulerTimeoutInWorkLoop = false;
59 -export const enableTransitionEntanglement = false;
59 export const enableNonInterruptingNormalPri = false;
60 export const enableDiscreteEventMicroTasks = false;
61 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
-1
@@ -56,7 +56,6 @@ export const enableUseRefAccessWarning = false;
56
57 export const enableRecursiveCommitTraversal = false;
58 export const disableSchedulerTimeoutInWorkLoop = false;
59 -export const enableTransitionEntanglement = false;
59 export const enableNonInterruptingNormalPri = false;
60 export const enableDiscreteEventMicroTasks = false;
61 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.testing.js
-1
@@ -56,7 +56,6 @@ export const enableUseRefAccessWarning = false;
56
57 export const enableRecursiveCommitTraversal = false;
58 export const disableSchedulerTimeoutInWorkLoop = false;
59 -export const enableTransitionEntanglement = false;
59 export const enableNonInterruptingNormalPri = false;
60 export const enableDiscreteEventMicroTasks = false;
61 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.testing.www.js
-1
@@ -56,7 +56,6 @@ export const enableUseRefAccessWarning = false;
56
57 export const enableRecursiveCommitTraversal = false;
58 export const disableSchedulerTimeoutInWorkLoop = false;
59 -export const enableTransitionEntanglement = false;
59 export const enableNonInterruptingNormalPri = false;
60 export const enableDiscreteEventMicroTasks = false;
61 export const enableNativeEventPriorityInference = false;
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
-1
@@ -55,7 +55,6 @@ export const enableUseRefAccessWarning = __VARIANT__;
55
56 export const enableProfilerNestedUpdateScheduledHook = __VARIANT__;
57 export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
58 -export const enableTransitionEntanglement = __VARIANT__;
58 export const enableNonInterruptingNormalPri = __VARIANT__;
59 export const enableDiscreteEventMicroTasks = __VARIANT__;
60 export const enableNativeEventPriorityInference = __VARIANT__;
packages/shared/forks/ReactFeatureFlags.www.js
-1
@@ -31,7 +31,6 @@ export const {
31 enableUseRefAccessWarning,
32 disableNativeComponentFrames,
33 disableSchedulerTimeoutInWorkLoop,
34 - enableTransitionEntanglement,
34 enableNonInterruptingNormalPri,
35 enableDiscreteEventMicroTasks,
36 enableNativeEventPriorityInference,