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

Function beginFiberMark

code/controlled-uncontrolled/public/app.js:6850–6867  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

6848};
6849
6850var beginFiberMark = function (fiber, phase) {
6851 var componentName = getComponentName(fiber) || 'Unknown';
6852 var debugID = fiber._debugID;
6853 var isMounted = fiber.alternate !== null;
6854 var label = getFiberLabel(componentName, isMounted, phase);
6855
6856 if (isCommitting && labelsInCurrentCommit.has(label)) {
6857 // During the commit phase, we don't show duplicate labels because
6858 // there is a fixed overhead for every measurement, and we don't
6859 // want to stretch the commit phase beyond necessary.
6860 return false;
6861 }
6862 labelsInCurrentCommit.add(label);
6863
6864 var markName = getFiberMarkName(label, debugID);
6865 beginMark(markName);
6866 return true;
6867};
6868
6869var clearFiberMark = function (fiber, phase) {
6870 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