MCPcopy Create free account
hub / github.com/microsoft/SandDance / beginFiberMark

Function beginFiberMark

docs/external/js/react-dom.development.js:10398–10415  ·  view source on GitHub ↗
(fiber, phase)

Source from the content-addressed store, hash-verified

10396 };
10397
10398 var beginFiberMark = function (fiber, phase) {
10399 var componentName = getComponentName(fiber.type) || 'Unknown';
10400 var debugID = fiber._debugID;
10401 var isMounted = fiber.alternate !== null;
10402 var label = getFiberLabel(componentName, isMounted, phase);
10403
10404 if (isCommitting && labelsInCurrentCommit.has(label)) {
10405 // During the commit phase, we don't show duplicate labels because
10406 // there is a fixed overhead for every measurement, and we don't
10407 // want to stretch the commit phase beyond necessary.
10408 return false;
10409 }
10410
10411 labelsInCurrentCommit.add(label);
10412 var markName = getFiberMarkName(label, debugID);
10413 beginMark(markName);
10414 return true;
10415 };
10416
10417 var clearFiberMark = function (fiber, phase) {
10418 var componentName = getComponentName(fiber.type) || 'Unknown';

Callers 3

resumeTimersRecursivelyFunction · 0.85
startWorkTimerFunction · 0.85
startPhaseTimerFunction · 0.85

Calls 6

getFiberLabelFunction · 0.85
getFiberMarkNameFunction · 0.85
beginMarkFunction · 0.85
getComponentNameFunction · 0.70
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected