mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[www] reduce dynamic SchedulerFeatureFlags (#26617)
For these values we're not using dynamic values. We can statically compile in the values we're running.
This commit is contained in:
@@ -344,7 +344,7 @@ describe('SchedulerBrowser', () => {
|
||||
// about, like a network event.
|
||||
gate(flags =>
|
||||
flags.enableIsInputPending
|
||||
? 'Yield at 300ms'
|
||||
? 'Yield at 10ms'
|
||||
: // When isInputPending is disabled, we always yield quickly
|
||||
'Yield at 5ms',
|
||||
),
|
||||
@@ -398,7 +398,7 @@ describe('SchedulerBrowser', () => {
|
||||
// about, like a network event.
|
||||
gate(flags =>
|
||||
flags.enableIsInputPending
|
||||
? 'Yield at 300ms'
|
||||
? 'Yield at 10ms'
|
||||
: // When isInputPending is disabled, we always yield quickly
|
||||
'Yield at 5ms',
|
||||
),
|
||||
@@ -423,7 +423,7 @@ describe('SchedulerBrowser', () => {
|
||||
// as quickly as for a discrete event.
|
||||
gate(flags =>
|
||||
flags.enableIsInputPending
|
||||
? 'Yield at 50ms'
|
||||
? 'Yield at 10ms'
|
||||
: // When isInputPending is disabled, we always yield quickly
|
||||
'Yield at 5ms',
|
||||
),
|
||||
@@ -453,7 +453,7 @@ describe('SchedulerBrowser', () => {
|
||||
'Task with no paint',
|
||||
gate(flags =>
|
||||
flags.enableIsInputPending
|
||||
? 'Yield at 300ms'
|
||||
? 'Yield at 10ms'
|
||||
: // When isInputPending is disabled, we always yield quickly
|
||||
'Yield at 5ms',
|
||||
),
|
||||
|
||||
@@ -11,10 +11,4 @@
|
||||
// Use __VARIANT__ to simulate a GK. The tests will be run twice: once
|
||||
// with the __VARIANT__ set to `true`, and once set to `false`.
|
||||
|
||||
export const enableIsInputPending = __VARIANT__;
|
||||
export const enableSchedulerDebugging = __VARIANT__;
|
||||
export const enableProfiling = __VARIANT__;
|
||||
export const enableIsInputPendingContinuous = __VARIANT__;
|
||||
export const frameYieldMs = 5;
|
||||
export const continuousYieldMs = 50;
|
||||
export const maxYieldMs = 300;
|
||||
|
||||
@@ -7,19 +7,15 @@
|
||||
* @flow
|
||||
*/
|
||||
|
||||
// $FlowFixMe[cannot-resolve-module]
|
||||
const dynamicFeatureFlags = require('SchedulerFeatureFlags');
|
||||
|
||||
// Re-export dynamic flags from the www version.
|
||||
export const {
|
||||
enableIsInputPending,
|
||||
enableSchedulerDebugging,
|
||||
enableProfiling: enableProfilingFeatureFlag,
|
||||
enableIsInputPendingContinuous,
|
||||
frameYieldMs,
|
||||
continuousYieldMs,
|
||||
maxYieldMs,
|
||||
} = dynamicFeatureFlags;
|
||||
const {enableProfiling: enableProfilingFeatureFlag} =
|
||||
// $FlowFixMe[cannot-resolve-module]
|
||||
require('SchedulerFeatureFlags');
|
||||
|
||||
export const enableSchedulerDebugging = true;
|
||||
export const enableProfiling: boolean =
|
||||
__PROFILE__ && enableProfilingFeatureFlag;
|
||||
export const enableIsInputPending = true;
|
||||
export const enableIsInputPendingContinuous = true;
|
||||
export const frameYieldMs = 5;
|
||||
export const continuousYieldMs = 10;
|
||||
export const maxYieldMs = 10;
|
||||
|
||||
Reference in New Issue
Block a user