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

Function beginFiberMark

code/higher-order-components/public/app.js:7520–7537  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

7518};
7519
7520var beginFiberMark = function (fiber, phase) {
7521 var componentName = getComponentName(fiber) || 'Unknown';
7522 var debugID = fiber._debugID;
7523 var isMounted = fiber.alternate !== null;
7524 var label = getFiberLabel(componentName, isMounted, phase);
7525
7526 if (isCommitting && labelsInCurrentCommit.has(label)) {
7527 // During the commit phase, we don't show duplicate labels because
7528 // there is a fixed overhead for every measurement, and we don't
7529 // want to stretch the commit phase beyond necessary.
7530 return false;
7531 }
7532 labelsInCurrentCommit.add(label);
7533
7534 var markName = getFiberMarkName(label, debugID);
7535 beginMark(markName);
7536 return true;
7537};
7538
7539var clearFiberMark = function (fiber, phase) {
7540 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