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

Function beginFiberMark

code/new-context-api/public/app.js:6887–6904  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

6885};
6886
6887var beginFiberMark = function (fiber, phase) {
6888 var componentName = getComponentName(fiber) || 'Unknown';
6889 var debugID = fiber._debugID;
6890 var isMounted = fiber.alternate !== null;
6891 var label = getFiberLabel(componentName, isMounted, phase);
6892
6893 if (isCommitting && labelsInCurrentCommit.has(label)) {
6894 // During the commit phase, we don't show duplicate labels because
6895 // there is a fixed overhead for every measurement, and we don't
6896 // want to stretch the commit phase beyond necessary.
6897 return false;
6898 }
6899 labelsInCurrentCommit.add(label);
6900
6901 var markName = getFiberMarkName(label, debugID);
6902 beginMark(markName);
6903 return true;
6904};
6905
6906var clearFiberMark = function (fiber, phase) {
6907 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