Skip to content

Commit 974ee00

Browse files
author
Brian Vaughn
committed
Moved commit time capture out of a hot loop
1 parent 22115eb commit 974ee00

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react-reconciler/src/ReactFiberScheduler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,6 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
422422
}
423423
}
424424

425-
if (enableProfilerTimer) {
426-
recordCommitTime();
427-
}
428-
429425
// The following switch statement is only concerned about placement,
430426
// updates, and deletions. To avoid needing to add a case for every
431427
// possible bitmap value, we remove the secondary effects from the
@@ -626,6 +622,10 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
626622
}
627623
stopCommitSnapshotEffectsTimer();
628624

625+
if (enableProfilerTimer) {
626+
recordCommitTime();
627+
}
628+
629629
// Commit all the side-effects within a tree. We'll do this in two passes.
630630
// The first pass performs all the host insertions, updates, deletions and
631631
// ref unmounts.

0 commit comments

Comments
 (0)