MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / beginFiberMark

Function beginFiberMark

code/composition/public/app.js:7664–7681  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

7662};
7663
7664var beginFiberMark = function (fiber, phase) {
7665 var componentName = getComponentName(fiber) || 'Unknown';
7666 var debugID = fiber._debugID;
7667 var isMounted = fiber.alternate !== null;
7668 var label = getFiberLabel(componentName, isMounted, phase);
7669
7670 if (isCommitting && labelsInCurrentCommit.has(label)) {
7671 // During the commit phase, we don't show duplicate labels because
7672 // there is a fixed overhead for every measurement, and we don't
7673 // want to stretch the commit phase beyond necessary.
7674 return false;
7675 }
7676 labelsInCurrentCommit.add(label);
7677
7678 var markName = getFiberMarkName(label, debugID);
7679 beginMark(markName);
7680 return true;
7681};
7682
7683var clearFiberMark = function (fiber, phase) {
7684 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