Home / File/ preprocessData.js — react Source File

preprocessData.js — react Source File

Architecture documentation for preprocessData.js, a javascript file in the react codebase. 7 imports, 1 dependents.

File javascript BabelCompiler Validation 7 imports 1 dependents 20 functions

Entity Profile

Dependency Diagram

graph LR
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a["preprocessData.js"]
  20cc2065_4b5b_fd6b_be12_28f36b0ff4cf["types.js"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  15b4085f_9f22_ce01_7452_bc922fb0f989["constants.js"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> 15b4085f_9f22_ce01_7452_bc922fb0f989
  13abdd7e_19d6_ddf6_8ae1_57dfb3f3b72f["InvalidProfileError.js"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> 13abdd7e_19d6_ddf6_8ae1_57dfb3f3b72f
  faa5ed90_bf45_aadf_762b_9cbd1a91aa65["InvalidProfileError"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> faa5ed90_bf45_aadf_762b_9cbd1a91aa65
  8fb21ca8_170b_4b4c_4dd4_5e259db0c418["getBatchRange.js"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> 8fb21ca8_170b_4b4c_4dd4_5e259db0c418
  1e1c6095_7712_f38a_035a_19c1ebe7c4ed["speedscope"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> 1e1c6095_7712_f38a_035a_19c1ebe7c4ed
  24a36b11_d722_13bc_2618_326e21791b68["error-stack-parser"]
  a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a --> 24a36b11_d722_13bc_2618_326e21791b68
  7413ab6d_5a4b_26b9_6ff5_21bf96ba027f["importFile.js"]
  7413ab6d_5a4b_26b9_6ff5_21bf96ba027f --> a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a
  style a3f7147d_da0b_56dc_ffc9_a9e2bbc4526a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import {
  importFromChromeTimeline,
  Flamechart as SpeedscopeFlamechart,
} from '@elg/speedscope';
import type {TimelineEvent} from '@elg/speedscope';
import type {
  ErrorStackFrame,
  BatchUID,
  Flamechart,
  Milliseconds,
  NativeEvent,
  NetworkMeasure,
  Phase,
  ReactLane,
  ReactComponentMeasure,
  ReactComponentMeasureType,
  ReactMeasure,
  ReactMeasureType,
  TimelineData,
  SchedulingEvent,
  SuspenseEvent,
  Snapshot,
} from '../types';
import {
  REACT_TOTAL_NUM_LANES,
  SCHEDULING_PROFILER_VERSION,
  SNAPSHOT_MAX_HEIGHT,
} from '../constants';
import InvalidProfileError from './InvalidProfileError';
import {getBatchRange} from '../utils/getBatchRange';
import ErrorStackParser from 'error-stack-parser';

type MeasureStackElement = {
  type: ReactMeasureType,
  depth: number,
  measure: ReactMeasure,
  startTime: Milliseconds,
  stopTime?: Milliseconds,
};

type ProcessorState = {
  asyncProcessingPromises: Promise<any>[],
  batchUID: BatchUID,
  currentReactComponentMeasure: ReactComponentMeasure | null,
  internalModuleCurrentStackFrame: ErrorStackFrame | null,
  internalModuleStackStringSet: Set<string>,
  measureStack: MeasureStackElement[],
  nativeEventStack: NativeEvent[],
  nextRenderShouldGenerateNewBatchID: boolean,
  potentialLongEvents: Array<[NativeEvent, BatchUID]>,
  potentialLongNestedUpdate: SchedulingEvent | null,
// ... (1115 more lines)

Domain

Subdomains

Frequently Asked Questions

What does preprocessData.js do?
preprocessData.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in preprocessData.js?
preprocessData.js defines 20 function(s): assertCurrentComponentMeasureType, assertNoOverlappingComponentMeasure, getDepth, getLanesFromTransportDecimalBitmask, getLastType, markWorkCompleted, markWorkStarted, parseStackFrame, preprocessData, preprocessFlamechart, and 10 more.
What does preprocessData.js depend on?
preprocessData.js imports 7 module(s): InvalidProfileError, InvalidProfileError.js, constants.js, error-stack-parser, getBatchRange.js, speedscope, types.js.
What files import preprocessData.js?
preprocessData.js is imported by 1 file(s): importFile.js.
Where is preprocessData.js in the architecture?
preprocessData.js is located at packages/react-devtools-timeline/src/import-worker/preprocessData.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-timeline/src/import-worker).

Analyze Your Own Codebase

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

Try Supermodel Free