> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# LoadBundleEntry

APISummary
_LoadBundle_ refers to the initial frame rendering pipeline triggered by [LynxView](/next/guide/spec.md#lynxview) loading and executing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). `LoadBundleEntry` is used to record the performance data of this rendering pipeline and inherits from [`PipelineEntry`](/next/api/lynx-api/performance-api/performance-entry/pipeline-entry.md).

The LoadBundle process flowchart is as follows:

![](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/plugin/static/load-bundle-entry-3-7-compressed.png)
:::tip

If you fail to receive `LoadBundleEntry`, it may be due to the following reasons:

**1. Rendering not triggered**

The rendering pipeline is not executed, typically because:

- **LynxView container state issues**: Width/Height is 0, not in the viewport, or not added to the window.
- **Business logic renders no content**: For example, in ReactLynx, the component's `render()` function returns `null` because data is not ready.

**2. Listener registered too late**

`LoadBundleEntry` is triggered only once upon completion of initial rendering. It is recommended to register the listener as early as possible:

- Register in `constructor` for class components.
- register in `useMemo` for functional components.

:::

## Example

This example demonstrates how to obtain a `LoadBundleEntry`.

**This is an example below: performance-api**

**Entry:** `src/load-bundle-entry`
**Bundle:** `dist/load-bundle-entry.lynx.bundle`

```tsx {10-20}
import { root, useMemo, useState } from "@lynx-js/react";
import type { LoadBundleEntry, PerformanceEntry } from "@lynx-js/types";
import { ScrollItem } from "../common/scroll-item/index.jsx";
import "./index.scss";

export default function LoadBundleEntryExample(this: any) {
  const [loadBundleEntry, setLoadBundleEntry] = useState("");

  useMemo(() => {
    "background-only";
    // 1. Create a performance observer.
    const observer = lynx.performance.createObserver((entry: PerformanceEntry) => {
      if (entry.entryType == "pipeline" && entry.name == "loadBundle") {
        // 3. Received "pipeline.loadBundle" event.
        const loadBundleEntry = entry as LoadBundleEntry;
        setLoadBundleEntry(JSON.stringify(loadBundleEntry, null, 4));
      }
    });
    // 2. Register to listen to the "pipeline" event.
    observer.observe(["pipeline"]);
  }, []);

  return (
    <view className="container">
      <text className="title">Hello LoadBundleEntry~</text>
      <ScrollItem title="LoadBundleEntry" value={loadBundleEntry} />
    </view>
  );
}

root.render(<LoadBundleEntryExample />);

if (import.meta.webpackHot) {
  import.meta.webpackHot.accept();
}

```

v0.8.0



## Instance properties

### [entryType](/next/api/lynx-api/performance-api/performance-entry.md#entrytype)

```ts
entryType: string;
```

The type of the performance event; the value for all instances of this class is fixed as `pipeline`.

### [name](/next/api/lynx-api/performance-api/performance-entry.md#name)

```ts
name: string;
```

The specific name of the performance event; the value for all instances of this class is fixed as `loadBundle`.

### identifier

```ts
identifier: string;
```

A marker for a particular rendering pipeline; the value for all instances of this class is fixed as an empty string.

### loadBundleStart

```ts
loadBundleStart: number;
```

The timestamp for the start of loading and executing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### loadBundleEnd

```ts
loadBundleEnd: number;
```

The timestamp for the end of loading and executing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### parseStart

```ts
parseStart: number;
```

The timestamp for the start of parsing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### parseEnd

```ts
parseEnd: number;
```

The timestamp for the end of parsing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### loadBackgroundStart

```ts
loadBackgroundStart: number;
```

The timestamp for the start of loading and executing the [background thread scripts](/next/guide/spec.md#background-thread-script-or-bts) in the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### loadBackgroundEnd

```ts
loadBackgroundEnd: number;
```

The timestamp for the end of loading and executing the [background thread scripts](/next/guide/spec.md#background-thread-script-or-bts) in the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md). This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### pipelineStart

```ts
pipelineStart: number;
```

The timestamp for the start of the rendering pipeline. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### pipelineEnd

```ts
pipelineEnd: number;
```

The timestamp for the end of the rendering pipeline. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### mtsRenderStart

```ts
mtsRenderStart: number;
```

The timestamp for the start of executing the [main thread scripts](/next/guide/spec.md#main-thread-script-or-mts) to build the Element Tree. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### mtsRenderEnd

```ts
mtsRenderEnd: number;
```

The timestamp for the end of executing the [main thread scripts](/next/guide/spec.md#main-thread-script-or-mts) to build the Element Tree. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### resolveStart

```ts
resolveStart: number;
```

The timestamp for the start of calculating [Element](/next/guide/spec.md#element) styles. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### resolveEnd

```ts
resolveEnd: number;
```

The timestamp for the end of calculating [Element](/next/guide/spec.md#element) styles. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### layoutStart

```ts
layoutStart: number;
```

The timestamp for the start of [layout](/next/guide/spec.md#layout) calculations. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### layoutEnd

```ts
layoutEnd: number;
```

The timestamp for the end of [layout](/next/guide/spec.md#layout) calculations. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### paintingUiOperationExecuteStart

```ts
paintingUiOperationExecuteStart: number;
```

The timestamp for the start of executing [UI operations](/next/guide/spec.md#ui-op) related to painting. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### paintingUiOperationExecuteEnd

```ts
paintingUiOperationExecuteEnd: number;
```

The timestamp for the end of executing [UI operations](/next/guide/spec.md#ui-op) related to painting. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### layoutUiOperationExecuteStart

```ts
layoutUiOperationExecuteStart: number;
```

The timestamp for the start of executing [UI operations](/next/guide/spec.md#ui-op) related to layout. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### layoutUiOperationExecuteEnd

```ts
layoutUiOperationExecuteEnd: number;
```

The timestamp for the end of executing [UI operations](/next/guide/spec.md#ui-op) related to layout. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### paintEnd

```ts
paintEnd: number;
```

The timestamp for the end of completing the final pixelation based on UI and UITree. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### frameworkPipelineTiming

```ts
frameworkPipelineTiming: FrameworkPipelineTiming[keyof FrameworkPipelineTiming];
```

Performance data for key stages in [Framework Rendering](/next/guide/spec.md#framework-rendering). The type is [`FrameworkPipelineTiming`](/next/api/lynx-api/performance-api/framework-pipeline-timing.md).

### hostPlatformTiming

```ts
hostPlatformTiming: AndroidHostPlatformTiming |
  HarmonyHostPlatformTiming |
  IOSHostPlatformTiming;
```

Performance data for platform-specific key stages in [Lynx Pipeline](/next/guide/spec.md#lynx-pipeline), with type [`AndroidHostPlatformTiming`](/next/api/lynx-api/performance-api/host-platform-timing/android-host-platform-timing.md) | [`HarmonyHostPlatformTiming`](/next/api/lynx-api/performance-api/host-platform-timing/harmony-host-platform-timing.md) | [`IOSHostPlatformTiming`](/next/api/lynx-api/performance-api/host-platform-timing/ios-host-platform-timing.md).

### loadCoreStart

```ts
loadCoreStart: number;
```

The timestamp for the start of initializing the [background thread runtime](/next/guide/spec.md#background-thread-runtime) environment. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### loadCoreEnd

```ts
loadCoreEnd: number;
```

The timestamp for the end of initializing the [background thread runtime](/next/guide/spec.md#background-thread-runtime) environment. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### openTime

```ts
openTime?: number;
```

The time when the container starts opening the Lynx page. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### containerInitStart

```ts
containerInitStart?: number;
```

The timestamp for the start of container initialization. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### containerInitEnd

```ts
containerInitEnd?: number;
```

The timestamp for the end of container initialization. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### prepareTemplateStart

```ts
prepareTemplateStart?: number;
```

The time when the container starts preparing the [TemplateBundle](/next/guide/spec.md#app-bundle-aka-template-bundle). "Preparation" refers to the container obtaining the TemplateBundle through any means such as network download or loading local cache. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### prepareTemplateEnd

```ts
prepareTemplateEnd?: number;
```

The time when the container completes preparing the [TemplateBundle](/next/guide/spec.md#app-bundle-aka-template-bundle). "Preparation" refers to the container obtaining the TemplateBundle through any means such as network download or loading local cache. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### createLynxStart

```ts
createLynxStart: number;
```

The timestamp for the start of creating the LynxView. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### createLynxEnd

```ts
createLynxEnd: number;
```

The timestamp for the end of creating the LynxView. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.

### fcp

```ts
fcp?: PerformanceMetric;
```

The time taken from preparing the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md) to completing the first rendering, with data type [`PerformanceMetric`](/next/api/lynx-api/performance-api/performance-metric.md).

Calculation formula: `fcp = LoadBundleEntry.paintEnd - InitContainerEntry.prepareTemplateStart`.

### lynxFcp

```ts
lynxFcp: PerformanceMetric;
```

The time taken from loading the [TemplateBundle](/next/api/lynx-native-api/template-bundle.md) to completing the first rendering, with data type [`PerformanceMetric`](/next/api/lynx-api/performance-api/performance-metric.md).

Calculation formula: `lynxFcp = LoadBundleEntry.paintEnd - LoadBundleEntry.loadBundleStart`.

### totalFcp

```ts
totalFcp?: PerformanceMetric;
```

The time taken from the user opening the page to completing the first rendering, with data type [`PerformanceMetric`](/next/api/lynx-api/performance-api/performance-metric.md).

Calculation formula: `totalFcp = LoadBundleEntry.paintEnd - InitContainerEntry.openTime`.

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.performance-api.performance-entry.load-bundle-entry`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/performance-api/performance-entry/load-bundle-entry.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| load-bundle-entry | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| entryType | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| name | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| identifier | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| loadBundleStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| loadBundleEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| parseStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| parseEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| loadBackgroundStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| loadBackgroundEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| pipelineStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| pipelineEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| mtsRenderStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| mtsRenderEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| resolveStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| resolveEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| layoutStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| paintingUiOperationExecuteEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| layoutUiOperationExecuteStart | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| layoutUiOperationExecuteEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| paintEnd | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| frameworkPipelineTiming | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |
| loadCoreStart | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| loadCoreEnd | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| openTime | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| containerInitStart | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| containerInitEnd | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| prepareTemplateStart | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| prepareTemplateEnd | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| createLynxStart | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| createLynxEnd | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| fcp | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| lynxFcp | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |
| totalFcp | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | Yes (3.7) | No |

