MCPcopy Index your code
hub / github.com/tastejs/todomvc / stopWorkLoopTimer

Function stopWorkLoopTimer

examples/typescript-react/js/bundle.js:10110–10132  ·  view source on GitHub ↗
(interruptedBy, didCompleteRoot)

Source from the content-addressed store, hash-verified

10108}
10109
10110function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
10111 if (enableUserTimingAPI) {
10112 if (!supportsUserTiming) {
10113 return;
10114 }
10115 var warning = null;
10116 if (interruptedBy !== null) {
10117 if (interruptedBy.tag === HostRoot) {
10118 warning = 'A top-level update interrupted the previous render';
10119 } else {
10120 var componentName = getComponentName(interruptedBy.type) || 'Unknown';
10121 warning = 'An update to ' + componentName + ' interrupted the previous render';
10122 }
10123 } else if (commitCountInCurrentWorkLoop > 1) {
10124 warning = 'There were cascading updates';
10125 }
10126 commitCountInCurrentWorkLoop = 0;
10127 var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)';
10128 // Pause any measurements until the next loop.
10129 pauseTimers();
10130 endMark(label, '(React Tree Reconciliation)', warning);
10131 }
10132}
10133
10134function startCommitTimer() {
10135 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.85

Calls 3

getComponentNameFunction · 0.85
pauseTimersFunction · 0.85
endMarkFunction · 0.85

Tested by

no test coverage detected