GeezerVison is showing github.com — Add maxYieldMs feature flag in Scheduler (#22165) · react/react@76bbad3
File tree
Expand 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/scheduler/src/SchedulerFeatureFlags.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,3 +12,4 @@ export const enableProfiling = false; |
12 | 12 | export const enableIsInputPendingContinuous = false; |
13 | 13 | export const frameYieldMs = 5; |
14 | 14 | export const continuousYieldMs = 50; |
| 15 | +export const maxYieldMs = 300; |
Collapse file
Copy file name to clipboardExpand all lines: packages/scheduler/src/forks/Scheduler.js +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,6 +15,7 @@ import { |
15 | 15 | enableIsInputPendingContinuous, |
16 | 16 | frameYieldMs, |
17 | 17 | continuousYieldMs, |
| 18 | + maxYieldMs, |
18 | 19 | } from '../SchedulerFeatureFlags'; |
19 | 20 |
|
20 | 21 | import {push, pop, peek} from '../SchedulerMinHeap'; |
@@ -431,7 +432,7 @@ let taskTimeoutID = -1; |
431 | 432 | // need to be frame aligned; for those that do, use requestAnimationFrame. |
432 | 433 | let frameInterval = frameYieldMs; |
433 | 434 | const continuousInputInterval = continuousYieldMs; |
434 | | -const maxInterval = 300; |
| 435 | +const maxInterval = maxYieldMs; |
435 | 436 | let startTime = -1; |
436 | 437 |
|
437 | 438 | let needsPaint = false; |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/scheduler/src/forks/SchedulerFeatureFlags.www-dynamic.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,3 +18,4 @@ export const enableProfiling = __VARIANT__; |
18 | 18 | export const enableIsInputPendingContinuous = __VARIANT__; |
19 | 19 | export const frameYieldMs = 5; |
20 | 20 | export const continuousYieldMs = 50; |
| 21 | +export const maxYieldMs = 300; |
Collapse file
Copy file name to clipboardExpand all lines: packages/scheduler/src/forks/SchedulerFeatureFlags.www.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -16,6 +16,7 @@ export const { |
16 | 16 | enableIsInputPendingContinuous, |
17 | 17 | frameYieldMs, |
18 | 18 | continuousYieldMs, |
| 19 | + maxYieldMs, |
19 | 20 | } = dynamicFeatureFlags; |
20 | 21 |
|
21 | 22 | export const enableProfiling = __PROFILE__ && enableProfilingFeatureFlag; |