MCPcopy Create free account
hub / github.com/plotly/dash / recordLayoutEffectDuration

Function recordLayoutEffectDuration

dash/deps/react-dom@18.3.1.js:17714–17739  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

17712 }
17713
17714 function recordLayoutEffectDuration(fiber) {
17715
17716 if (layoutEffectStartTime >= 0) {
17717 var elapsedTime = now$1() - layoutEffectStartTime;
17718 layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor
17719 // Or the root (for the DevTools Profiler to read)
17720
17721 var parentFiber = fiber.return;
17722
17723 while (parentFiber !== null) {
17724 switch (parentFiber.tag) {
17725 case HostRoot:
17726 var root = parentFiber.stateNode;
17727 root.effectDuration += elapsedTime;
17728 return;
17729
17730 case Profiler:
17731 var parentStateNode = parentFiber.stateNode;
17732 parentStateNode.effectDuration += elapsedTime;
17733 return;
17734 }
17735
17736 parentFiber = parentFiber.return;
17737 }
17738 }
17739 }
17740
17741 function recordPassiveEffectDuration(fiber) {
17742

Callers 8

safelyDetachRefFunction · 0.70
commitAttachRefFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…