Skip to content

Commit 79b5b33

Browse files
committed
Revert "Performance tracks are sorted by start time" hack
This reverts commit d3bf32a which was part of facebook#30983
1 parent 2ec26bc commit 79b5b33

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/react-reconciler/src/ReactProfilerTimer.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,8 @@ export function popComponentEffectStart(prevEffectStart: number): void {
193193
if (!enableProfilerTimer || !enableProfilerCommitHooks) {
194194
return;
195195
}
196-
if (prevEffectStart < 0) {
197-
// If the parent component didn't have a start time, we use the start
198-
// of the child as the parent's start time. We subtrack a minimal amount of
199-
// time to ensure that the parent's start time is before the child to ensure
200-
// that the performance tracks line up in the right order.
201-
componentEffectStartTime -= 0.001;
202-
} else {
196+
// If the parent component didn't have a start time, we let this current time persist.
197+
if (prevEffectStart >= 0) {
203198
// Otherwise, we restore the previous parent's start time.
204199
componentEffectStartTime = prevEffectStart;
205200
}

0 commit comments

Comments
 (0)