Remove disableSchedulerTimeoutInWorkLoop flag (#19902)
We found and mitigated the root cause of the regression that led us to temporarily revert this change. So now I'm un-reverting it.
Andrew Clark committed
Sep 28, 2020 at 12:19 UTC
ba82eea3837e4aaeb5a30b7827b664a8c2128d2e
12 files changed
+2
-39
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+1
-14
@@ -30,7 +30,6 @@ import {
30
enableSchedulingProfiler,
31
enableScopeAPI,
32
skipUnmountedBoundaries,
33
- disableSchedulerTimeoutInWorkLoop,
33
enableDoubleInvokingEffects,
34
} from 'shared/ReactFeatureFlags';
35
import ReactSharedInternals from 'shared/ReactSharedInternals';
@@ -745,7 +744,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) {
744
745
// This is the entry point for every concurrent task, i.e. anything that
746
// goes through Scheduler.
748
-function performConcurrentWorkOnRoot(root, didTimeout) {
747
+function performConcurrentWorkOnRoot(root) {
748
// Since we know we're in a React event, we can clear the current
749
// event time. The next update will compute a new event time.
750
currentEventTime = NoTimestamp;
@@ -785,18 +784,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
784
return null;
785
}
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
-
787
let exitStatus = renderRootConcurrent(root, lanes);
788
789
if (
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+1
-14
@@ -30,7 +30,6 @@ import {
30
enableSchedulingProfiler,
31
enableScopeAPI,
32
skipUnmountedBoundaries,
33
- disableSchedulerTimeoutInWorkLoop,
33
} from 'shared/ReactFeatureFlags';
34
import ReactSharedInternals from 'shared/ReactSharedInternals';
35
import invariant from 'shared/invariant';
@@ -739,7 +738,7 @@ function ensureRootIsScheduled(root: FiberRoot, currentTime: number) {
738
739
// This is the entry point for every concurrent task, i.e. anything that
740
// goes through Scheduler.
742
-function performConcurrentWorkOnRoot(root, didTimeout) {
741
+function performConcurrentWorkOnRoot(root) {
742
// Since we know we're in a React event, we can clear the current
743
// event time. The next update will compute a new event time.
744
currentEventTime = NoTimestamp;
@@ -779,18 +778,6 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
778
return null;
779
}
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
-
781
let exitStatus = renderRootConcurrent(root, lanes);
782
783
if (
packages/shared/ReactFeatureFlags.js
-2
@@ -135,6 +135,4 @@ export const enableDiscreteEventFlushingChange = false;
135
136
export const enableEagerRootListeners = true;
137
138
-export const disableSchedulerTimeoutInWorkLoop = false;
139
-
138
export const enableDoubleInvokingEffects = false;
packages/shared/forks/ReactFeatureFlags.native-fb.js
-1
@@ -50,7 +50,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
50
export const decoupleUpdatePriorityFromScheduler = false;
51
export const enableDiscreteEventFlushingChange = false;
52
export const enableEagerRootListeners = true;
53
-export const disableSchedulerTimeoutInWorkLoop = false;
53
54
export const enableDoubleInvokingEffects = false;
55
packages/shared/forks/ReactFeatureFlags.native-oss.js
-1
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
49
export const decoupleUpdatePriorityFromScheduler = false;
50
export const enableDiscreteEventFlushingChange = false;
51
export const enableEagerRootListeners = true;
52
-export const disableSchedulerTimeoutInWorkLoop = false;
52
53
export const enableDoubleInvokingEffects = false;
54
packages/shared/forks/ReactFeatureFlags.test-renderer.js
-1
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
49
export const decoupleUpdatePriorityFromScheduler = false;
50
export const enableDiscreteEventFlushingChange = false;
51
export const enableEagerRootListeners = true;
52
-export const disableSchedulerTimeoutInWorkLoop = false;
52
53
export const enableDoubleInvokingEffects = false;
54
packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
-1
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
49
export const decoupleUpdatePriorityFromScheduler = false;
50
export const enableDiscreteEventFlushingChange = false;
51
export const enableEagerRootListeners = true;
52
-export const disableSchedulerTimeoutInWorkLoop = false;
52
53
export const enableDoubleInvokingEffects = false;
54
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
-1
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
49
export const decoupleUpdatePriorityFromScheduler = false;
50
export const enableDiscreteEventFlushingChange = false;
51
export const enableEagerRootListeners = true;
52
-export const disableSchedulerTimeoutInWorkLoop = false;
52
53
export const enableDoubleInvokingEffects = false;
54
packages/shared/forks/ReactFeatureFlags.testing.js
-1
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
49
export const decoupleUpdatePriorityFromScheduler = false;
50
export const enableDiscreteEventFlushingChange = false;
51
export const enableEagerRootListeners = true;
52
-export const disableSchedulerTimeoutInWorkLoop = false;
52
53
export const enableDoubleInvokingEffects = false;
54
packages/shared/forks/ReactFeatureFlags.testing.www.js
-1
@@ -49,7 +49,6 @@ export const deferRenderPhaseUpdateToNextBatch = true;
49
export const decoupleUpdatePriorityFromScheduler = false;
50
export const enableDiscreteEventFlushingChange = true;
51
export const enableEagerRootListeners = true;
52
-export const disableSchedulerTimeoutInWorkLoop = false;
52
53
export const enableDoubleInvokingEffects = false;
54
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
-1
@@ -47,6 +47,5 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
47
// to __VARIANT__.
48
export const enableTrustedTypesIntegration = false;
49
export const disableSchedulerTimeoutBasedOnReactExpirationTime = false;
50
-export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
50
51
export const enableDoubleInvokingEffects = false;
packages/shared/forks/ReactFeatureFlags.www.js
-1
@@ -28,7 +28,6 @@ export const {
28
enableDebugTracing,
29
skipUnmountedBoundaries,
30
enableEagerRootListeners,
31
- disableSchedulerTimeoutInWorkLoop,
31
enableDoubleInvokingEffects,
32
} = dynamicFeatureFlags;
33