Home / Function/ startUpdateTimerByLane() — react Function Reference

startUpdateTimerByLane() — react Function Reference

Architecture documentation for the startUpdateTimerByLane() function in ReactProfilerTimer.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  f64561a1_1520_9236_41c4_94bbc359732a["startUpdateTimerByLane()"]
  e054b9c7_41f1_c7f7_97bb_98b6a445e94b["ReactProfilerTimer.js"]
  f64561a1_1520_9236_41c4_94bbc359732a -->|defined in| e054b9c7_41f1_c7f7_97bb_98b6a445e94b
  f64a10f1_c1e7_88f4_a513_9932d62bb913["classComponentUpdater.lane()"]
  f64a10f1_c1e7_88f4_a513_9932d62bb913 -->|calls| f64561a1_1520_9236_41c4_94bbc359732a
  185b9fca_89de_9f5e_3430_21909e9b039c["createTask()"]
  f64561a1_1520_9236_41c4_94bbc359732a -->|calls| 185b9fca_89de_9f5e_3430_21909e9b039c
  style f64561a1_1520_9236_41c4_94bbc359732a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactProfilerTimer.js lines 121–198

export function startUpdateTimerByLane(
  lane: Lane,
  method: string,
  fiber: Fiber | null,
): void {
  if (!enableProfilerTimer || !enableComponentPerformanceTrack) {
    return;
  }
  if (isGestureRender(lane)) {
    if (gestureUpdateTime < 0) {
      gestureUpdateTime = now();
      gestureUpdateTask = createTask(method);
      gestureUpdateMethodName = method;
      if (__DEV__ && fiber != null) {
        gestureUpdateComponentName = getComponentNameFromFiber(fiber);
      }
      const newEventTime = resolveEventTimeStamp();
      const newEventType = resolveEventType();
      if (
        newEventTime !== gestureEventRepeatTime ||
        newEventType !== gestureEventType
      ) {
        gestureEventRepeatTime = -1.1;
      }
      gestureEventTime = newEventTime;
      gestureEventType = newEventType;
    }
  } else if (isBlockingLane(lane)) {
    if (blockingUpdateTime < 0) {
      blockingUpdateTime = now();
      blockingUpdateTask = createTask(method);
      blockingUpdateMethodName = method;
      if (__DEV__ && fiber != null) {
        blockingUpdateComponentName = getComponentNameFromFiber(fiber);
      }
      if (isAlreadyRendering()) {
        componentEffectSpawnedUpdate = true;
        blockingUpdateType = SPAWNED_UPDATE;
      }
      const newEventTime = resolveEventTimeStamp();
      const newEventType = resolveEventType();
      if (
        newEventTime !== blockingEventRepeatTime ||
        newEventType !== blockingEventType
      ) {
        blockingEventRepeatTime = -1.1;
      } else if (newEventType !== null) {
        // If this is a second update in the same event, we treat it as a spawned update.
        // This might be a microtask spawned from useEffect, multiple flushSync or
        // a setState in a microtask spawned after the first setState. Regardless it's bad.
        blockingUpdateType = SPAWNED_UPDATE;
      }
      blockingEventTime = newEventTime;
      blockingEventType = newEventType;
    }
  } else if (isTransitionLane(lane)) {
    if (transitionUpdateTime < 0) {
      transitionUpdateTime = now();
      transitionUpdateTask = createTask(method);
      transitionUpdateMethodName = method;
      if (__DEV__ && fiber != null) {
        transitionUpdateComponentName = getComponentNameFromFiber(fiber);
      }
      if (transitionStartTime < 0) {
        const newEventTime = resolveEventTimeStamp();
        const newEventType = resolveEventType();
        if (
          newEventTime !== transitionEventRepeatTime ||
          newEventType !== transitionEventType
        ) {
          transitionEventRepeatTime = -1.1;
        }
        transitionEventTime = newEventTime;
        transitionEventType = newEventType;
      }
    }
  }
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does startUpdateTimerByLane() do?
startUpdateTimerByLane() is a function in the react codebase, defined in packages/react-reconciler/src/ReactProfilerTimer.js.
Where is startUpdateTimerByLane() defined?
startUpdateTimerByLane() is defined in packages/react-reconciler/src/ReactProfilerTimer.js at line 121.
What does startUpdateTimerByLane() call?
startUpdateTimerByLane() calls 1 function(s): createTask.
What calls startUpdateTimerByLane()?
startUpdateTimerByLane() is called by 1 function(s): classComponentUpdater.lane.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free