GeezerVison is showing github.com — Remove disableSchedulerTimeoutInWorkLoop flag (#19902) · react/react@ba82eea
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.new.js +1-14Lines changed: 1 addition & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,7 +30,6 @@ import { | 30 | 30 | enableSchedulingProfiler, | 31 | 31 | enableScopeAPI, | 32 | 32 | skipUnmountedBoundaries, | 33 | | - disableSchedulerTimeoutInWorkLoop, | 34 | 33 | enableDoubleInvokingEffects, | 35 | 34 | } from 'shared/ReactFeatureFlags'; | 36 | 35 | import ReactSharedInternals from 'shared/ReactSharedInternals'; | @@ -745,7 +744,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) { | 745 | 744 |
| 746 | 745 | // This is the entry point for every concurrent task, i.e. anything that | 747 | 746 | // goes through Scheduler. | 748 | | -function performConcurrentWorkOnRoot(root, didTimeout) { | | 747 | +function performConcurrentWorkOnRoot(root) { | 749 | 748 | // Since we know we're in a React event, we can clear the current | 750 | 749 | // event time. The next update will compute a new event time. | 751 | 750 | currentEventTime = NoTimestamp; | @@ -785,18 +784,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { | 785 | 784 | return null; | 786 | 785 | } | 787 | 786 |
| 788 | | - // TODO: We only check `didTimeout` defensively, to account for a Scheduler | 789 | | - // bug we're still investigating. Once the bug in Scheduler is fixed, | 790 | | - // we can remove this, since we track expiration ourselves. | 791 | | - if (!disableSchedulerTimeoutInWorkLoop && didTimeout) { | 792 | | - // Something expired. Flush synchronously until there's no expired | 793 | | - // work left. | 794 | | - markRootExpired(root, lanes); | 795 | | - // This will schedule a synchronous callback. | 796 | | - ensureRootIsScheduled(root, now()); | 797 | | - return null; | 798 | | - } | 799 | | - | 800 | 787 | let exitStatus = renderRootConcurrent(root, lanes); | 801 | 788 |
| 802 | 789 | if ( | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.old.js +1-14Lines changed: 1 addition & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,7 +30,6 @@ import { | 30 | 30 | enableSchedulingProfiler, | 31 | 31 | enableScopeAPI, | 32 | 32 | skipUnmountedBoundaries, | 33 | | - disableSchedulerTimeoutInWorkLoop, | 34 | 33 | } from 'shared/ReactFeatureFlags'; | 35 | 34 | import ReactSharedInternals from 'shared/ReactSharedInternals'; | 36 | 35 | import invariant from 'shared/invariant'; | @@ -739,7 +738,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) { | 739 | 738 |
| 740 | 739 | // This is the entry point for every concurrent task, i.e. anything that | 741 | 740 | // goes through Scheduler. | 742 | | -function performConcurrentWorkOnRoot(root, didTimeout) { | | 741 | +function performConcurrentWorkOnRoot(root) { | 743 | 742 | // Since we know we're in a React event, we can clear the current | 744 | 743 | // event time. The next update will compute a new event time. | 745 | 744 | currentEventTime = NoTimestamp; | @@ -779,18 +778,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) { | 779 | 778 | return null; | 780 | 779 | } | 781 | 780 |
| 782 | | - // TODO: We only check `didTimeout` defensively, to account for a Scheduler | 783 | | - // bug we're still investigating. Once the bug in Scheduler is fixed, | 784 | | - // we can remove this, since we track expiration ourselves. | 785 | | - if (!disableSchedulerTimeoutInWorkLoop && didTimeout) { | 786 | | - // Something expired. Flush synchronously until there's no expired | 787 | | - // work left. | 788 | | - markRootExpired(root, lanes); | 789 | | - // This will schedule a synchronous callback. | 790 | | - ensureRootIsScheduled(root, now()); | 791 | | - return null; | 792 | | - } | 793 | | - | 794 | 781 | let exitStatus = renderRootConcurrent(root, lanes); | 795 | 782 |
| 796 | 783 | if ( | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/ReactFeatureFlags.js -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -135,6 +135,4 @@ export const enableDiscreteEventFlushingChange = false; | 135 | 135 |
| 136 | 136 | export const enableEagerRootListeners = true; | 137 | 137 |
| 138 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 139 | | - | 140 | 138 | export const enableDoubleInvokingEffects = false; |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.native-fb.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -50,7 +50,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 50 | 50 | export const decoupleUpdatePriorityFromScheduler = false; | 51 | 51 | export const enableDiscreteEventFlushingChange = false; | 52 | 52 | export const enableEagerRootListeners = true; | 53 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 54 | 53 |
| 55 | 54 | export const enableDoubleInvokingEffects = false; | 56 | 55 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.native-oss.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 49 | 49 | export const decoupleUpdatePriorityFromScheduler = false; | 50 | 50 | export const enableDiscreteEventFlushingChange = false; | 51 | 51 | export const enableEagerRootListeners = true; | 52 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 53 | 52 |
| 54 | 53 | export const enableDoubleInvokingEffects = false; | 55 | 54 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 49 | 49 | export const decoupleUpdatePriorityFromScheduler = false; | 50 | 50 | export const enableDiscreteEventFlushingChange = false; | 51 | 51 | export const enableEagerRootListeners = true; | 52 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 53 | 52 |
| 54 | 53 | export const enableDoubleInvokingEffects = false; | 55 | 54 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.native.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 49 | 49 | export const decoupleUpdatePriorityFromScheduler = false; | 50 | 50 | export const enableDiscreteEventFlushingChange = false; | 51 | 51 | export const enableEagerRootListeners = true; | 52 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 53 | 52 |
| 54 | 53 | export const enableDoubleInvokingEffects = false; | 55 | 54 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 49 | 49 | export const decoupleUpdatePriorityFromScheduler = false; | 50 | 50 | export const enableDiscreteEventFlushingChange = false; | 51 | 51 | export const enableEagerRootListeners = true; | 52 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 53 | 52 |
| 54 | 53 | export const enableDoubleInvokingEffects = false; | 55 | 54 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.testing.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 49 | 49 | export const decoupleUpdatePriorityFromScheduler = false; | 50 | 50 | export const enableDiscreteEventFlushingChange = false; | 51 | 51 | export const enableEagerRootListeners = true; | 52 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 53 | 52 |
| 54 | 53 | export const enableDoubleInvokingEffects = false; | 55 | 54 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.testing.www.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true; | 49 | 49 | export const decoupleUpdatePriorityFromScheduler = false; | 50 | 50 | export const enableDiscreteEventFlushingChange = true; | 51 | 51 | export const enableEagerRootListeners = true; | 52 | | -export const disableSchedulerTimeoutInWorkLoop = false; | 53 | 52 |
| 54 | 53 | export const enableDoubleInvokingEffects = false; | 55 | 54 |
| |
|