Skip to content

Commit

Permalink
Revert "Performance tracks are sorted by start time" hack
Browse files Browse the repository at this point in the history
This reverts commit d3bf32a which was part of #30983
  • Loading branch information
sebmarkbage committed Nov 12, 2024
1 parent 2ec26bc commit 79b5b33
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/react-reconciler/src/ReactProfilerTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,8 @@ export function popComponentEffectStart(prevEffectStart: number): void {
if (!enableProfilerTimer || !enableProfilerCommitHooks) {
return;
}
if (prevEffectStart < 0) {
// If the parent component didn't have a start time, we use the start
// of the child as the parent's start time. We subtrack a minimal amount of
// time to ensure that the parent's start time is before the child to ensure
// that the performance tracks line up in the right order.
componentEffectStartTime -= 0.001;
} else {
// If the parent component didn't have a start time, we let this current time persist.
if (prevEffectStart >= 0) {
// Otherwise, we restore the previous parent's start time.
componentEffectStartTime = prevEffectStart;
}
Expand Down

0 comments on commit 79b5b33

Please sign in to comment.