Skip to content

Commit e20ab2a

Browse files
committed
Disable enableSchedulingProfiler when enableComponentPerformanceTrack is on
I.e. in the experimental builds. enableComponentPerformanceTrack is the spiritual successor for enableSchedulingProfiler so having both on at the same time can lead to unexpected interactions.
1 parent 7762952 commit e20ab2a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,6 @@ export const disableTextareaChildren = false;
260260
// Debugging and DevTools
261261
// -----------------------------------------------------------------------------
262262

263-
// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,
264-
// for an experimental timeline tool.
265-
export const enableSchedulingProfiler = __PROFILE__;
266-
267263
// Helps identify side effects in render-phase lifecycle hooks and setState
268264
// reducers by double invoking them in StrictLegacyMode.
269265
export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
@@ -277,6 +273,11 @@ export const enableProfilerTimer = __PROFILE__;
277273
// All calls should also be gated on enableProfilerTimer.
278274
export const enableComponentPerformanceTrack = __EXPERIMENTAL__;
279275

276+
// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,
277+
// for an experimental timeline tool.
278+
export const enableSchedulingProfiler: boolean =
279+
!enableComponentPerformanceTrack && __PROFILE__;
280+
280281
// Record durations for commit and passive effects phases.
281282
export const enableProfilerCommitHooks = __PROFILE__;
282283

0 commit comments

Comments
 (0)