MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / beginFiberMark

Function beginFiberMark

code/one-direction-data-flow/public/app.js:7399–7416  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

7397};
7398
7399var beginFiberMark = function (fiber, phase) {
7400 var componentName = getComponentName(fiber) || 'Unknown';
7401 var debugID = fiber._debugID;
7402 var isMounted = fiber.alternate !== null;
7403 var label = getFiberLabel(componentName, isMounted, phase);
7404
7405 if (isCommitting && labelsInCurrentCommit.has(label)) {
7406 // During the commit phase, we don't show duplicate labels because
7407 // there is a fixed overhead for every measurement, and we don't
7408 // want to stretch the commit phase beyond necessary.
7409 return false;
7410 }
7411 labelsInCurrentCommit.add(label);
7412
7413 var markName = getFiberMarkName(label, debugID);
7414 beginMark(markName);
7415 return true;
7416};
7417
7418var clearFiberMark = function (fiber, phase) {
7419 var componentName = getComponentName(fiber) || 'Unknown';

Callers 3

resumeTimersRecursivelyFunction · 0.70
startWorkTimerFunction · 0.70
startPhaseTimerFunction · 0.70

Calls 4

getComponentNameFunction · 0.70
getFiberLabelFunction · 0.70
getFiberMarkNameFunction · 0.70
beginMarkFunction · 0.70

Tested by

no test coverage detected