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

Function beginFiberMark

code/communication/public/app.js:7561–7578  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

7559};
7560
7561var beginFiberMark = function (fiber, phase) {
7562 var componentName = getComponentName(fiber) || 'Unknown';
7563 var debugID = fiber._debugID;
7564 var isMounted = fiber.alternate !== null;
7565 var label = getFiberLabel(componentName, isMounted, phase);
7566
7567 if (isCommitting && labelsInCurrentCommit.has(label)) {
7568 // During the commit phase, we don't show duplicate labels because
7569 // there is a fixed overhead for every measurement, and we don't
7570 // want to stretch the commit phase beyond necessary.
7571 return false;
7572 }
7573 labelsInCurrentCommit.add(label);
7574
7575 var markName = getFiberMarkName(label, debugID);
7576 beginMark(markName);
7577 return true;
7578};
7579
7580var clearFiberMark = function (fiber, phase) {
7581 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