Make remaining empty lanes Transition lanes (#20793)
Doesn't really have any effect now because we batch everything together anyway but will allow for more parallelism once we support that.
Andrew Clark committed
Feb 10, 2021 at 18:25 UTC
114ab52953bea3d78785e25300e70cce56f307e9
4 files changed
+148
-122
packages/react-reconciler/src/ReactFiberLane.new.js
+37
-27
@@ -87,38 +87,43 @@ export const SyncBatchedLane: Lane = /* */ 0b0000000000000000000
87
export const InputDiscreteHydrationLane: Lane = /* */ 0b0000000000000000000000000000100;
88
const InputDiscreteLane: Lanes = /* */ 0b0000000000000000000000000001000;
89
90
-const InputContinuousHydrationLane: Lane = /* */ 0b0000000000000000000000000100000;
91
-const InputContinuousLane: Lanes = /* */ 0b0000000000000000000000001000000;
92
-
93
-export const DefaultHydrationLane: Lane = /* */ 0b0000000000000000000000100000000;
94
-export const DefaultLane: Lanes = /* */ 0b0000000000000000000001000000000;
95
-
96
-const TransitionHydrationLane: Lane = /* */ 0b0000000000000000001000000000000;
97
-const TransitionLanes: Lanes = /* */ 0b0000000001111111110000000000000;
98
-const TransitionLane1: Lane = /* */ 0b0000000000000000010000000000000;
99
-const TransitionLane2: Lane = /* */ 0b0000000000000000100000000000000;
100
-const TransitionLane3: Lane = /* */ 0b0000000000000001000000000000000;
101
-const TransitionLane4: Lane = /* */ 0b0000000000000010000000000000000;
102
-const TransitionLane5: Lane = /* */ 0b0000000000000100000000000000000;
103
-const TransitionLane6: Lane = /* */ 0b0000000000001000000000000000000;
104
-const TransitionLane7: Lane = /* */ 0b0000000000010000000000000000000;
105
-const TransitionLane8: Lane = /* */ 0b0000000000100000000000000000000;
106
-const TransitionLane9: Lane = /* */ 0b0000000001000000000000000000000;
107
-
108
-const RetryLanes: Lanes = /* */ 0b0000011110000000000000000000000;
109
-const RetryLane1: Lane = /* */ 0b0000000010000000000000000000000;
110
-const RetryLane2: Lane = /* */ 0b0000000100000000000000000000000;
111
-const RetryLane3: Lane = /* */ 0b0000001000000000000000000000000;
112
-const RetryLane4: Lane = /* */ 0b0000010000000000000000000000000;
90
+const InputContinuousHydrationLane: Lane = /* */ 0b0000000000000000000000000010000;
91
+const InputContinuousLane: Lanes = /* */ 0b0000000000000000000000000100000;
92
+
93
+export const DefaultHydrationLane: Lane = /* */ 0b0000000000000000000000001000000;
94
+export const DefaultLane: Lanes = /* */ 0b0000000000000000000000010000000;
95
+
96
+const TransitionLanes: Lanes = /* */ 0b0000000011111111111111100000000;
97
+const TransitionHydrationLane: Lane = /* */ 0b0000000000000000000000100000000;
98
+const TransitionLane1: Lane = /* */ 0b0000000000000000000001000000000;
99
+const TransitionLane2: Lane = /* */ 0b0000000000000000000010000000000;
100
+const TransitionLane3: Lane = /* */ 0b0000000000000000000100000000000;
101
+const TransitionLane4: Lane = /* */ 0b0000000000000000001000000000000;
102
+const TransitionLane5: Lane = /* */ 0b0000000000000000010000000000000;
103
+const TransitionLane6: Lane = /* */ 0b0000000000000000100000000000000;
104
+const TransitionLane7: Lane = /* */ 0b0000000000000001000000000000000;
105
+const TransitionLane8: Lane = /* */ 0b0000000000000010000000000000000;
106
+const TransitionLane9: Lane = /* */ 0b0000000000000100000000000000000;
107
+const TransitionLane10: Lane = /* */ 0b0000000000001000000000000000000;
108
+const TransitionLane11: Lane = /* */ 0b0000000000010000000000000000000;
109
+const TransitionLane12: Lane = /* */ 0b0000000000100000000000000000000;
110
+const TransitionLane13: Lane = /* */ 0b0000000001000000000000000000000;
111
+const TransitionLane14: Lane = /* */ 0b0000000010000000000000000000000;
112
+
113
+const RetryLanes: Lanes = /* */ 0b0000111100000000000000000000000;
114
+const RetryLane1: Lane = /* */ 0b0000000100000000000000000000000;
115
+const RetryLane2: Lane = /* */ 0b0000001000000000000000000000000;
116
+const RetryLane3: Lane = /* */ 0b0000010000000000000000000000000;
117
+const RetryLane4: Lane = /* */ 0b0000100000000000000000000000000;
118
119
export const SomeRetryLane: Lane = RetryLane1;
120
116
-export const SelectiveHydrationLane: Lane = /* */ 0b0000100000000000000000000000000;
121
+export const SelectiveHydrationLane: Lane = /* */ 0b0001000000000000000000000000000;
122
118
-const NonIdleLanes = /* */ 0b0000111111111111111111111111111;
123
+const NonIdleLanes = /* */ 0b0001111111111111111111111111111;
124
120
-export const IdleHydrationLane: Lane = /* */ 0b0001000000000000000000000000000;
121
-const IdleLane: Lanes = /* */ 0b0010000000000000000000000000000;
125
+export const IdleHydrationLane: Lane = /* */ 0b0010000000000000000000000000000;
126
+const IdleLane: Lanes = /* */ 0b0100000000000000000000000000000;
127
128
export const OffscreenLane: Lane = /* */ 0b1000000000000000000000000000000;
129
@@ -179,6 +184,11 @@ function getHighestPriorityLanes(lanes: Lanes | Lane): Lanes {
184
case TransitionLane7:
185
case TransitionLane8:
186
case TransitionLane9:
187
+ case TransitionLane10:
188
+ case TransitionLane11:
189
+ case TransitionLane12:
190
+ case TransitionLane13:
191
+ case TransitionLane14:
192
return_highestLanePriority = TransitionPriority;
193
return lanes & TransitionLanes;
194
case RetryLane1:
packages/react-reconciler/src/ReactFiberLane.old.js
+37
-27
@@ -87,38 +87,43 @@ export const SyncBatchedLane: Lane = /* */ 0b0000000000000000000
87
export const InputDiscreteHydrationLane: Lane = /* */ 0b0000000000000000000000000000100;
88
const InputDiscreteLane: Lanes = /* */ 0b0000000000000000000000000001000;
89
90
-const InputContinuousHydrationLane: Lane = /* */ 0b0000000000000000000000000100000;
91
-const InputContinuousLane: Lanes = /* */ 0b0000000000000000000000001000000;
92
-
93
-export const DefaultHydrationLane: Lane = /* */ 0b0000000000000000000000100000000;
94
-export const DefaultLane: Lanes = /* */ 0b0000000000000000000001000000000;
95
-
96
-const TransitionHydrationLane: Lane = /* */ 0b0000000000000000001000000000000;
97
-const TransitionLanes: Lanes = /* */ 0b0000000001111111110000000000000;
98
-const TransitionLane1: Lane = /* */ 0b0000000000000000010000000000000;
99
-const TransitionLane2: Lane = /* */ 0b0000000000000000100000000000000;
100
-const TransitionLane3: Lane = /* */ 0b0000000000000001000000000000000;
101
-const TransitionLane4: Lane = /* */ 0b0000000000000010000000000000000;
102
-const TransitionLane5: Lane = /* */ 0b0000000000000100000000000000000;
103
-const TransitionLane6: Lane = /* */ 0b0000000000001000000000000000000;
104
-const TransitionLane7: Lane = /* */ 0b0000000000010000000000000000000;
105
-const TransitionLane8: Lane = /* */ 0b0000000000100000000000000000000;
106
-const TransitionLane9: Lane = /* */ 0b0000000001000000000000000000000;
107
-
108
-const RetryLanes: Lanes = /* */ 0b0000011110000000000000000000000;
109
-const RetryLane1: Lane = /* */ 0b0000000010000000000000000000000;
110
-const RetryLane2: Lane = /* */ 0b0000000100000000000000000000000;
111
-const RetryLane3: Lane = /* */ 0b0000001000000000000000000000000;
112
-const RetryLane4: Lane = /* */ 0b0000010000000000000000000000000;
90
+const InputContinuousHydrationLane: Lane = /* */ 0b0000000000000000000000000010000;
91
+const InputContinuousLane: Lanes = /* */ 0b0000000000000000000000000100000;
92
+
93
+export const DefaultHydrationLane: Lane = /* */ 0b0000000000000000000000001000000;
94
+export const DefaultLane: Lanes = /* */ 0b0000000000000000000000010000000;
95
+
96
+const TransitionLanes: Lanes = /* */ 0b0000000011111111111111100000000;
97
+const TransitionHydrationLane: Lane = /* */ 0b0000000000000000000000100000000;
98
+const TransitionLane1: Lane = /* */ 0b0000000000000000000001000000000;
99
+const TransitionLane2: Lane = /* */ 0b0000000000000000000010000000000;
100
+const TransitionLane3: Lane = /* */ 0b0000000000000000000100000000000;
101
+const TransitionLane4: Lane = /* */ 0b0000000000000000001000000000000;
102
+const TransitionLane5: Lane = /* */ 0b0000000000000000010000000000000;
103
+const TransitionLane6: Lane = /* */ 0b0000000000000000100000000000000;
104
+const TransitionLane7: Lane = /* */ 0b0000000000000001000000000000000;
105
+const TransitionLane8: Lane = /* */ 0b0000000000000010000000000000000;
106
+const TransitionLane9: Lane = /* */ 0b0000000000000100000000000000000;
107
+const TransitionLane10: Lane = /* */ 0b0000000000001000000000000000000;
108
+const TransitionLane11: Lane = /* */ 0b0000000000010000000000000000000;
109
+const TransitionLane12: Lane = /* */ 0b0000000000100000000000000000000;
110
+const TransitionLane13: Lane = /* */ 0b0000000001000000000000000000000;
111
+const TransitionLane14: Lane = /* */ 0b0000000010000000000000000000000;
112
+
113
+const RetryLanes: Lanes = /* */ 0b0000111100000000000000000000000;
114
+const RetryLane1: Lane = /* */ 0b0000000100000000000000000000000;
115
+const RetryLane2: Lane = /* */ 0b0000001000000000000000000000000;
116
+const RetryLane3: Lane = /* */ 0b0000010000000000000000000000000;
117
+const RetryLane4: Lane = /* */ 0b0000100000000000000000000000000;
118
119
export const SomeRetryLane: Lane = RetryLane1;
120
116
-export const SelectiveHydrationLane: Lane = /* */ 0b0000100000000000000000000000000;
121
+export const SelectiveHydrationLane: Lane = /* */ 0b0001000000000000000000000000000;
122
118
-const NonIdleLanes = /* */ 0b0000111111111111111111111111111;
123
+const NonIdleLanes = /* */ 0b0001111111111111111111111111111;
124
120
-export const IdleHydrationLane: Lane = /* */ 0b0001000000000000000000000000000;
121
-const IdleLane: Lanes = /* */ 0b0010000000000000000000000000000;
125
+export const IdleHydrationLane: Lane = /* */ 0b0010000000000000000000000000000;
126
+const IdleLane: Lanes = /* */ 0b0100000000000000000000000000000;
127
128
export const OffscreenLane: Lane = /* */ 0b1000000000000000000000000000000;
129
@@ -179,6 +184,11 @@ function getHighestPriorityLanes(lanes: Lanes | Lane): Lanes {
184
case TransitionLane7:
185
case TransitionLane8:
186
case TransitionLane9:
187
+ case TransitionLane10:
188
+ case TransitionLane11:
189
+ case TransitionLane12:
190
+ case TransitionLane13:
191
+ case TransitionLane14:
192
return_highestLanePriority = TransitionPriority;
193
return lanes & TransitionLanes;
194
case RetryLane1:
packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js
+32
-29
@@ -16,6 +16,9 @@ describe('DebugTracing', () => {
16
17
let logs;
18
19
+ const DEFAULT_LANE_STRING = '0b0000000000000000000000010000000';
20
+ const RETRY_LANE_STRING = '0b0000000100000000000000000000000';
21
+
22
beforeEach(() => {
23
jest.resetModules();
24
@@ -129,9 +132,9 @@ describe('DebugTracing', () => {
132
expect(Scheduler).toFlushUntilNextPaint([]);
133
134
expect(logs).toEqual([
132
- 'group: ⚛️ render (0b0000000010000000000000000000000)',
135
+ `group: ⚛️ render (${RETRY_LANE_STRING})`,
136
'log: <Example/>',
134
- 'groupEnd: ⚛️ render (0b0000000010000000000000000000000)',
137
+ `groupEnd: ⚛️ render (${RETRY_LANE_STRING})`,
138
]);
139
});
140
@@ -158,9 +161,9 @@ describe('DebugTracing', () => {
161
expect(Scheduler).toFlushUntilNextPaint([]);
162
163
expect(logs).toEqual([
161
- 'group: ⚛️ render (0b0000000000000000000001000000000)',
164
+ `group: ⚛️ render (${DEFAULT_LANE_STRING})`,
165
'log: ⚛️ Example suspended',
163
- 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
166
+ `groupEnd: ⚛️ render (${DEFAULT_LANE_STRING})`,
167
]);
168
169
logs.splice(0);
@@ -199,9 +202,9 @@ describe('DebugTracing', () => {
202
expect(Scheduler).toFlushUntilNextPaint([]);
203
204
expect(logs).toEqual([
202
- 'group: ⚛️ render (0b0000000000000000000001000000000)',
205
+ `group: ⚛️ render (${DEFAULT_LANE_STRING})`,
206
'log: <Wrapper/>',
204
- 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
207
+ `groupEnd: ⚛️ render (${DEFAULT_LANE_STRING})`,
208
]);
209
210
logs.splice(0);
@@ -209,9 +212,9 @@ describe('DebugTracing', () => {
212
expect(Scheduler).toFlushUntilNextPaint([]);
213
214
expect(logs).toEqual([
212
- 'group: ⚛️ render (0b0000000010000000000000000000000)',
215
+ `group: ⚛️ render (${RETRY_LANE_STRING})`,
216
'log: <Example/>',
214
- 'groupEnd: ⚛️ render (0b0000000010000000000000000000000)',
217
+ `groupEnd: ⚛️ render (${RETRY_LANE_STRING})`,
218
]);
219
});
220
@@ -241,11 +244,11 @@ describe('DebugTracing', () => {
244
expect(Scheduler).toFlushUntilNextPaint([]);
245
246
expect(logs).toEqual([
244
- 'group: ⚛️ commit (0b0000000000000000000001000000000)',
245
- 'group: ⚛️ layout effects (0b0000000000000000000001000000000)',
247
+ `group: ⚛️ commit (${DEFAULT_LANE_STRING})`,
248
+ `group: ⚛️ layout effects (${DEFAULT_LANE_STRING})`,
249
'log: ⚛️ Example updated state (0b0000000000000000000000000000001)',
247
- 'groupEnd: ⚛️ layout effects (0b0000000000000000000001000000000)',
248
- 'groupEnd: ⚛️ commit (0b0000000000000000000001000000000)',
250
+ `groupEnd: ⚛️ layout effects (${DEFAULT_LANE_STRING})`,
251
+ `groupEnd: ⚛️ commit (${DEFAULT_LANE_STRING})`,
252
]);
253
});
254
@@ -277,10 +280,10 @@ describe('DebugTracing', () => {
280
}).toErrorDev('Cannot update during an existing state transition');
281
282
expect(logs).toEqual([
280
- 'group: ⚛️ render (0b0000000000000000000001000000000)',
281
- 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
282
- 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
283
- 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
283
+ `group: ⚛️ render (${DEFAULT_LANE_STRING})`,
284
+ `log: ⚛️ Example updated state (${DEFAULT_LANE_STRING})`,
285
+ `log: ⚛️ Example updated state (${DEFAULT_LANE_STRING})`,
286
+ `groupEnd: ⚛️ render (${DEFAULT_LANE_STRING})`,
287
]);
288
});
289
@@ -308,11 +311,11 @@ describe('DebugTracing', () => {
311
expect(Scheduler).toFlushUntilNextPaint([]);
312
313
expect(logs).toEqual([
311
- 'group: ⚛️ commit (0b0000000000000000000001000000000)',
312
- 'group: ⚛️ layout effects (0b0000000000000000000001000000000)',
314
+ `group: ⚛️ commit (${DEFAULT_LANE_STRING})`,
315
+ `group: ⚛️ layout effects (${DEFAULT_LANE_STRING})`,
316
'log: ⚛️ Example updated state (0b0000000000000000000000000000001)',
314
- 'groupEnd: ⚛️ layout effects (0b0000000000000000000001000000000)',
315
- 'groupEnd: ⚛️ commit (0b0000000000000000000001000000000)',
317
+ `groupEnd: ⚛️ layout effects (${DEFAULT_LANE_STRING})`,
318
+ `groupEnd: ⚛️ commit (${DEFAULT_LANE_STRING})`,
319
]);
320
});
321
@@ -335,9 +338,9 @@ describe('DebugTracing', () => {
338
);
339
});
340
expect(logs).toEqual([
338
- 'group: ⚛️ passive effects (0b0000000000000000000001000000000)',
339
- 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
340
- 'groupEnd: ⚛️ passive effects (0b0000000000000000000001000000000)',
341
+ `group: ⚛️ passive effects (${DEFAULT_LANE_STRING})`,
342
+ `log: ⚛️ Example updated state (${DEFAULT_LANE_STRING})`,
343
+ `groupEnd: ⚛️ passive effects (${DEFAULT_LANE_STRING})`,
344
]);
345
});
346
@@ -361,10 +364,10 @@ describe('DebugTracing', () => {
364
});
365
366
expect(logs).toEqual([
364
- 'group: ⚛️ render (0b0000000000000000000001000000000)',
365
- 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)',
366
- 'log: ⚛️ Example updated state (0b0000000000000000000001000000000)', // debugRenderPhaseSideEffectsForStrictMode
367
- 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
367
+ `group: ⚛️ render (${DEFAULT_LANE_STRING})`,
368
+ `log: ⚛️ Example updated state (${DEFAULT_LANE_STRING})`,
369
+ `log: ⚛️ Example updated state (${DEFAULT_LANE_STRING})`, // debugRenderPhaseSideEffectsForStrictMode
370
+ `groupEnd: ⚛️ render (${DEFAULT_LANE_STRING})`,
371
]);
372
});
373
@@ -389,9 +392,9 @@ describe('DebugTracing', () => {
392
expect(Scheduler).toFlushUntilNextPaint([]);
393
394
expect(logs).toEqual([
392
- 'group: ⚛️ render (0b0000000000000000000001000000000)',
395
+ `group: ⚛️ render (${DEFAULT_LANE_STRING})`,
396
'log: Hello from user code',
394
- 'groupEnd: ⚛️ render (0b0000000000000000000001000000000)',
397
+ `groupEnd: ⚛️ render (${DEFAULT_LANE_STRING})`,
398
]);
399
});
400
packages/react-reconciler/src/__tests__/SchedulingProfiler-test.internal.js
+42
-39
@@ -85,6 +85,9 @@ describe('SchedulingProfiler', () => {
85
delete global.performance;
86
});
87
88
+ // This is coupled to implementation
89
+ const DEFAULT_LANE = 128;
90
+
91
// @gate !enableSchedulingProfiler
92
it('should not mark if enableSchedulingProfiler is false', () => {
93
ReactTestRenderer.create(<div />);
@@ -118,7 +121,7 @@ describe('SchedulingProfiler', () => {
121
122
expectMarksToEqual([
123
`--react-init-${ReactVersion}`,
121
- '--schedule-render-512',
124
+ `--schedule-render-${DEFAULT_LANE}`,
125
]);
126
127
clearPendingMarks();
@@ -126,10 +129,10 @@ describe('SchedulingProfiler', () => {
129
expect(Scheduler).toFlushUntilNextPaint([]);
130
131
expectMarksToEqual([
129
- '--render-start-512',
132
+ `--render-start-${DEFAULT_LANE}`,
133
'--render-stop',
131
- '--commit-start-512',
132
- '--layout-effects-start-512',
134
+ `--commit-start-${DEFAULT_LANE}`,
135
+ `--layout-effects-start-${DEFAULT_LANE}`,
136
'--layout-effects-stop',
137
'--commit-stop',
138
]);
@@ -153,8 +156,8 @@ describe('SchedulingProfiler', () => {
156
157
expectMarksToEqual([
158
`--react-init-${ReactVersion}`,
156
- '--schedule-render-512',
157
- '--render-start-512',
159
+ `--schedule-render-${DEFAULT_LANE}`,
160
+ `--render-start-${DEFAULT_LANE}`,
161
'--render-yield',
162
]);
163
});
@@ -237,7 +240,7 @@ describe('SchedulingProfiler', () => {
240
241
expectMarksToEqual([
242
`--react-init-${ReactVersion}`,
240
- '--schedule-render-512',
243
+ `--schedule-render-${DEFAULT_LANE}`,
244
]);
245
246
clearPendingMarks();
@@ -245,11 +248,11 @@ describe('SchedulingProfiler', () => {
248
expect(Scheduler).toFlushUntilNextPaint([]);
249
250
expectMarksToEqual([
248
- '--render-start-512',
251
+ `--render-start-${DEFAULT_LANE}`,
252
'--suspense-suspend-0-Example',
253
'--render-stop',
251
- '--commit-start-512',
252
- '--layout-effects-start-512',
254
+ `--commit-start-${DEFAULT_LANE}`,
255
+ `--layout-effects-start-${DEFAULT_LANE}`,
256
'--layout-effects-stop',
257
'--commit-stop',
258
]);
@@ -276,7 +279,7 @@ describe('SchedulingProfiler', () => {
279
280
expectMarksToEqual([
281
`--react-init-${ReactVersion}`,
279
- '--schedule-render-512',
282
+ `--schedule-render-${DEFAULT_LANE}`,
283
]);
284
285
clearPendingMarks();
@@ -284,11 +287,11 @@ describe('SchedulingProfiler', () => {
287
expect(Scheduler).toFlushUntilNextPaint([]);
288
289
expectMarksToEqual([
287
- '--render-start-512',
290
+ `--render-start-${DEFAULT_LANE}`,
291
'--suspense-suspend-0-Example',
292
'--render-stop',
290
- '--commit-start-512',
291
- '--layout-effects-start-512',
293
+ `--commit-start-${DEFAULT_LANE}`,
294
+ `--layout-effects-start-${DEFAULT_LANE}`,
295
'--layout-effects-stop',
296
'--commit-stop',
297
]);
@@ -315,7 +318,7 @@ describe('SchedulingProfiler', () => {
318
319
expectMarksToEqual([
320
`--react-init-${ReactVersion}`,
318
- '--schedule-render-512',
321
+ `--schedule-render-${DEFAULT_LANE}`,
322
]);
323
324
clearPendingMarks();
@@ -323,10 +326,10 @@ describe('SchedulingProfiler', () => {
326
expect(Scheduler).toFlushUntilNextPaint([]);
327
328
expectMarksToEqual([
326
- '--render-start-512',
329
+ `--render-start-${DEFAULT_LANE}`,
330
'--render-stop',
328
- '--commit-start-512',
329
- '--layout-effects-start-512',
331
+ `--commit-start-${DEFAULT_LANE}`,
332
+ `--layout-effects-start-${DEFAULT_LANE}`,
333
'--schedule-state-update-1-Example',
334
'--layout-effects-stop',
335
'--render-start-1',
@@ -352,7 +355,7 @@ describe('SchedulingProfiler', () => {
355
356
expectMarksToEqual([
357
`--react-init-${ReactVersion}`,
355
- '--schedule-render-512',
358
+ `--schedule-render-${DEFAULT_LANE}`,
359
]);
360
361
clearPendingMarks();
@@ -360,10 +363,10 @@ describe('SchedulingProfiler', () => {
363
expect(Scheduler).toFlushUntilNextPaint([]);
364
365
expectMarksToEqual([
363
- '--render-start-512',
366
+ `--render-start-${DEFAULT_LANE}`,
367
'--render-stop',
365
- '--commit-start-512',
366
- '--layout-effects-start-512',
368
+ `--commit-start-${DEFAULT_LANE}`,
369
+ `--layout-effects-start-${DEFAULT_LANE}`,
370
'--schedule-forced-update-1-Example',
371
'--layout-effects-stop',
372
'--render-start-1',
@@ -390,7 +393,7 @@ describe('SchedulingProfiler', () => {
393
394
expectMarksToEqual([
395
`--react-init-${ReactVersion}`,
393
- '--schedule-render-512',
396
+ `--schedule-render-${DEFAULT_LANE}`,
397
]);
398
399
clearPendingMarks();
@@ -399,7 +402,7 @@ describe('SchedulingProfiler', () => {
402
expect(Scheduler).toFlushUntilNextPaint([]);
403
}).toErrorDev('Cannot update during an existing state transition');
404
402
- expectMarksToContain('--schedule-state-update-512-Example');
405
+ expectMarksToContain(`--schedule-state-update-${DEFAULT_LANE}-Example`);
406
});
407
408
// @gate enableSchedulingProfiler
@@ -418,7 +421,7 @@ describe('SchedulingProfiler', () => {
421
422
expectMarksToEqual([
423
`--react-init-${ReactVersion}`,
421
- '--schedule-render-512',
424
+ `--schedule-render-${DEFAULT_LANE}`,
425
]);
426
427
clearPendingMarks();
@@ -427,7 +430,7 @@ describe('SchedulingProfiler', () => {
430
expect(Scheduler).toFlushUntilNextPaint([]);
431
}).toErrorDev('Cannot update during an existing state transition');
432
430
- expectMarksToContain('--schedule-forced-update-512-Example');
433
+ expectMarksToContain(`--schedule-forced-update-${DEFAULT_LANE}-Example`);
434
});
435
436
// @gate enableSchedulingProfiler
@@ -444,7 +447,7 @@ describe('SchedulingProfiler', () => {
447
448
expectMarksToEqual([
449
`--react-init-${ReactVersion}`,
447
- '--schedule-render-512',
450
+ `--schedule-render-${DEFAULT_LANE}`,
451
]);
452
453
clearPendingMarks();
@@ -452,10 +455,10 @@ describe('SchedulingProfiler', () => {
455
expect(Scheduler).toFlushUntilNextPaint([]);
456
457
expectMarksToEqual([
455
- '--render-start-512',
458
+ `--render-start-${DEFAULT_LANE}`,
459
'--render-stop',
457
- '--commit-start-512',
458
- '--layout-effects-start-512',
460
+ `--commit-start-${DEFAULT_LANE}`,
461
+ `--layout-effects-start-${DEFAULT_LANE}`,
462
'--schedule-state-update-1-Example',
463
'--layout-effects-stop',
464
'--render-start-1',
@@ -484,19 +487,19 @@ describe('SchedulingProfiler', () => {
487
488
expectMarksToEqual([
489
`--react-init-${ReactVersion}`,
487
- '--schedule-render-512',
488
- '--render-start-512',
490
+ `--schedule-render-${DEFAULT_LANE}`,
491
+ `--render-start-${DEFAULT_LANE}`,
492
'--render-stop',
490
- '--commit-start-512',
491
- '--layout-effects-start-512',
493
+ `--commit-start-${DEFAULT_LANE}`,
494
+ `--layout-effects-start-${DEFAULT_LANE}`,
495
'--layout-effects-stop',
496
'--commit-stop',
494
- '--passive-effects-start-512',
495
- '--schedule-state-update-512-Example',
497
+ `--passive-effects-start-${DEFAULT_LANE}`,
498
+ `--schedule-state-update-${DEFAULT_LANE}-Example`,
499
'--passive-effects-stop',
497
- '--render-start-512',
500
+ `--render-start-${DEFAULT_LANE}`,
501
'--render-stop',
499
- '--commit-start-512',
502
+ `--commit-start-${DEFAULT_LANE}`,
503
'--commit-stop',
504
]);
505
});
@@ -515,6 +518,6 @@ describe('SchedulingProfiler', () => {
518
ReactTestRenderer.create(<Example />, {unstable_isConcurrent: true});
519
});
520
518
- expectMarksToContain('--schedule-state-update-512-Example');
521
+ expectMarksToContain(`--schedule-state-update-${DEFAULT_LANE}-Example`);
522
});
523
});