Skip to content

Commit c3a9e42

Browse files
committed
fix: Add missing fields of FrameworkRenderingTiming
rename FrameworkPipelineTiming to FrameworkRenderingTiming add vmExecuteStart/End, dataProcessorStrart/End and setInitDataStart/End in FrameworkRenderingTiming. Change-Id: I94758afb6491967f02e944f546450b987753ff51
1 parent c0abddf commit c3a9e42

File tree

11 files changed

+164
-40
lines changed

11 files changed

+164
-40
lines changed

docs/en/api/lynx-api/performance-api/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
},
2626
{
2727
"type": "file",
28-
"name": "framework-pipeline-timing",
29-
"label": "FrameworkPipelineTiming",
28+
"name": "framework-rendering-timing",
29+
"label": "FrameworkRenderingTiming",
3030
"overviewHeaders": [],
3131
"collapsible": true,
3232
"collapsed": true

docs/en/api/lynx-api/performance-api/framework-pipeline-timing.mdx renamed to docs/en/api/lynx-api/performance-api/framework-rendering-timing.mdx

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { RuntimeBadge } from '@lynx';
22

3-
# FrameworkPipelineTiming
3+
# FrameworkRenderingTiming
44

55
This interface describes the performance data of key stages in [framework rendering](/guide/spec#framework-rendering).
66

7+
In the [First-screen Rendering](/guide/spec#first-screen-rendering-or-fsr) and [Re-rendering](/guide/spec#re-rendering), the framework is responsible for a series of critical tasks. The diagram below illustrates the significant steps of framework rendering in the entire FSR and Re-rendering processes:
8+
9+
- **The yellow sections represent the key phases of framework rendering**.
10+
- The green sections represent the key phases of [Engine Rendering (Pixel Pipeline)](/guide/spec#pixel-pipeline), with details available at [PipelineEntry](/api/lynx-api/performance-api/performance-entry/pipeline-entry).
11+
- The purple sections represent the key phases of [Lynx Engine](/guide/spec#engine), with details available at [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
12+
13+
![Critical Phases in Framework Rendering](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/doc/framework-rendering-timing.png)
14+
715
## Instance Properties
816

917
### dsl
@@ -94,9 +102,7 @@ hydrateParseSnapshotStart: number;
94102

95103
The timestamp when the framework starts deserializing [main thread](/guide/spec.html#main-thread-or-lynx-main-thread) information on the [background thread](/guide/spec.html#background-thread-aka-off-main-thread). This timestamp is a floating-point Unix timestamp (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.
96104

97-
:::tip
98105
This property is only valid when `stage` is `hydrate`.
99-
:::
100106

101107
### hydrateParseSnapshotEnd
102108

@@ -106,12 +112,70 @@ hydrateParseSnapshotEnd: number;
106112

107113
The timestamp when the framework ends deserializing [main thread](/guide/spec.html#main-thread-or-lynx-main-thread) information on the [background thread](/guide/spec.html#background-thread-aka-off-main-thread). This timestamp is a floating-point Unix timestamp (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.
108114

109-
:::tip
110115
This property is only valid when `stage` is `hydrate`.
111-
:::
116+
117+
### vmExecuteStart
118+
119+
```tsx
120+
vmExecuteStart: number;
121+
```
122+
123+
The timestamp when the framework starts executing [`main-thread.js`](/guide/spec.html#instances-of-main-thread-script) in the main thread to initialize the [Javascript Engine](/guide/spec.html#javascript-engine). This timestamp is a floating-point Unix timestamp (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.
124+
125+
This property is only valid when `frameworkRenderingTiming` is present in [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
126+
127+
### vmExecuteEnd
128+
129+
```tsx
130+
vmExecuteEnd: number;
131+
```
132+
133+
The timestamp when the framework ends executing [`main-thread.js`](/guide/spec.html#instances-of-main-thread-script) in the main thread to initialize the [Javascript engine](/guide/spec.html#javascript-engine). This timestamp is a Unix timestamp expressed as a floating point (unit: milliseconds), accurate to three decimal places. For example: 1739594612307.429.
134+
135+
This property is only valid when `frameworkRenderingTiming` is present in [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
136+
137+
### dataProcessorStart
138+
139+
```tsx
140+
dataProcessorStart: number;
141+
```
142+
143+
The timestamp when the framework starts initial data processing by executing the [DataProcessor](/api/react/interface.dataprocessordefinition.mdx) in the main thread. This timestamp is a floating-point Unix timestamp (unit: milliseconds), accurate to three decimal places. For example: 1739594612307.429.
144+
145+
This property is only valid when `frameworkRenderingTiming` is present in [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
146+
147+
### dataProcessorEnd
148+
149+
```tsx
150+
dataProcessorEnd: number;
151+
```
152+
153+
The timestamp when the framework completes initial data processing by executing the [DataProcessor](/api/react/interface.dataprocessordefinition.mdx) in the main thread. This timestamp is a floating-point Unix timestamp (unit: milliseconds), accurate to three decimal places. For example: 1739594612307.429.
154+
155+
This property is only valid when `frameworkRenderingTiming` is present in [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
156+
157+
### setInitDataStart
158+
159+
```tsx
160+
setInitDataStart: number;
161+
```
162+
163+
The timestamp when the [update init data](/guide/use-data-from-host-platform#provide-and-update-data) starts. This timestamp is a floating point Unix timestamp (unit: milliseconds), accurate to three decimal places. For example: 1739594612307.429
164+
165+
This property is only valid when `frameworkRenderingTiming` is present in [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
166+
167+
### setInitDataEnd
168+
169+
```tsx
170+
setInitDataEnd: number;
171+
```
172+
173+
The timestamp when the [update init data](/guide/use-data-from-host-platform#provide-and-update-data) ends. This timestamp is a floating point Unix timestamp (unit: milliseconds), accurate to three decimal places. For example: 1739594612307.429.
174+
175+
This property is only valid when `frameworkRenderingTiming` is present in [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry).
112176

113177
## Compatibility
114178

115179
import { LegacyCompatTable } from '@lynx';
116180

117-
<LegacyCompatTable metadata="lynx-api/performance-api/framework-pipeline-timing" />
181+
<LegacyCompatTable metadata="lynx-api/performance-api/framework-rendering-timing" />

docs/en/api/lynx-api/performance-api/performance-entry/load-bundle-entry.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ paintEnd: number;
199199

200200
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.
201201

202-
### frameworkPipelineTiming
202+
### frameworkRenderingTiming
203203

204204
```ts
205-
frameworkPipelineTiming: FrameworkPipelineTiming[keyof FrameworkPipelineTiming];
205+
frameworkRenderingTiming: FrameworkRenderingTiming;
206206
```
207207

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

210210
## Compatibility
211211

docs/en/api/lynx-api/performance-api/performance-entry/pipeline-entry.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { RuntimeBadge } from '@lynx';
44

55
`PipelineEntry` is responsible for recording performance data at key moments during the [Lynx Pipeline](/guide/spec#lynx-pipeline), specifically for [Framework Rendering](/guide/spec#framework-rendering) and [Pixel Pipeline](/guide/spec#pixel-pipeline). It inherits from [`PerformanceEntry`](../performance-entry).
66

7-
The Lynx Pipeline refers to the complete process from the trigger of rendering to the final display. This process is divided into four main parts: Load, Parse, Framework Rendering (FrameworkPipeline), and Engine Rendering (PixelPipeline).
7+
The Lynx Pipeline refers to the complete process from the trigger of rendering to the final display. This process is divided into four main parts: [Load](/guide/spec#load), [Parse](/guide/spec#parse), [Framework Rendering](/guide/spec#framework-rendering), and [Pixel Pipeline](/guide/spec#pixel-pipeline).
88

99
Due to the frequent triggering of the Lynx Pipeline, the framework only records the following two cases:
1010

@@ -169,15 +169,15 @@ The timestamp for the end of executing [UI operations](/guide/spec#ui-op) relate
169169
paintEnd: number;
170170
```
171171

172-
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.
172+
The timestamp when the [paint](/guide/spec#paint) ends. This timestamp is represented as a floating-point Unix timestamp (in milliseconds) with three decimal places. For example: 1739594612307.429.
173173

174-
### frameworkPipelineTiming
174+
### frameworkRenderingTiming
175175

176176
```ts
177-
frameworkPipelineTiming: FrameworkPipelineTiming[keyof FrameworkPipelineTiming];
177+
frameworkRenderingTiming: FrameworkRenderingTiming;
178178
```
179179

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

182182
## Compatibility
183183

docs/zh/api/lynx-api/performance-api/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
},
2626
{
2727
"type": "file",
28-
"name": "framework-pipeline-timing",
29-
"label": "FrameworkPipelineTiming",
28+
"name": "framework-rendering-timing",
29+
"label": "FrameworkRenderingTiming",
3030
"overviewHeaders": [],
3131
"collapsible": true,
3232
"collapsed": true

docs/zh/api/lynx-api/performance-api/framework-pipeline-timing.mdx renamed to docs/zh/api/lynx-api/performance-api/framework-rendering-timing.mdx

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { RuntimeBadge } from '@lynx';
22

3-
# FrameworkPipelineTiming
3+
# FrameworkRenderingTiming
44

55
该接口描述了[框架渲染](/guide/spec#framework-rendering)中关键阶段的性能数据。
66

7+
[首屏渲染(First-screen Rendering)](/guide/spec#first-screen-rendering-or-fsr)[重渲染(Re-rendering)](/guide/spec#re-rendering) 中,框架承担了一系列重要任务。下图展示了框架渲染在整个 FSR 和 Re-rendering 流程中的关键作用:
8+
9+
- **黄色部分代表框架渲染中的关键阶段**
10+
- 绿色部分代表[引擎渲染(Pixel Pipeline)](/guide/spec#pixel-pipeline)的重要阶段,详细内容可在 [PipelineEntry](/api/lynx-api/performance-api/performance-entry/pipeline-entry) 中查看。
11+
- 紫色部分代表 FSR 中的 [Lynx 引擎](/guide/spec#engine)的重要任务,详细内容可在 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 中查看。
12+
13+
![框架渲染中的关键阶段](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/doc/framework-rendering-timing.png)
14+
715
## 实例属性
816

917
### dsl
@@ -94,12 +102,8 @@ hydrateParseSnapshotStart: number;
94102

95103
框架在[后台线程](/guide/spec.html#background-thread-aka-off-main-thread)反序列化[主线程](/guide/spec.html#main-thread-or-lynx-main-thread)信息开始的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
96104

97-
:::tip
98-
99105
该属性仅当 `stage``hydrate` 时有效。
100106

101-
:::
102-
103107
### hydrateParseSnapshotEnd
104108

105109
```tsx
@@ -108,14 +112,70 @@ hydrateParseSnapshotEnd: number;
108112

109113
框架在[后台线程](/guide/spec.html#background-thread-aka-off-main-thread)反序列化[主线程](/guide/spec.html#main-thread-or-lynx-main-thread)信息结束的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
110114

111-
:::tip
112-
113115
该属性仅当 `stage``hydrate` 时有效。
114116

115-
:::
117+
### vmExecuteStart
118+
119+
```tsx
120+
vmExecuteStart: number;
121+
```
122+
123+
框架在主线程执行 [`main-thread.js`](/guide/spec.html#instances-of-main-thread-script) 初始化 [Javascript 引擎](/guide/spec.html#javascript-engine)开始的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
124+
125+
该属性仅当 `frameworkRenderingTiming` 存在于 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 时有效。
126+
127+
### vmExecuteEnd
128+
129+
```tsx
130+
vmExecuteEnd: number;
131+
```
132+
133+
框架在主线程执行 [`main-thread.js`](/guide/spec.html#instances-of-main-thread-script) 初始化 [Javascript 引擎](/guide/spec.html#javascript-engine)结束的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
134+
135+
该属性仅当 `frameworkRenderingTiming` 存在于 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 时有效。
136+
137+
### dataProcessorStart
138+
139+
```tsx
140+
dataProcessorStart: number;
141+
```
142+
143+
框架在主线程执行[数据预处理函数(DataProcessor)](/api/react/interface.dataprocessordefinition.mdx) 进行初始数据处理开始的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
144+
145+
该属性仅当 `frameworkRenderingTiming` 存在于 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 时有效。
146+
147+
### dataProcessorEnd
148+
149+
```tsx
150+
dataProcessorEnd: number;
151+
```
152+
153+
框架在主线程执行[数据预处理函数(DataProcessor)](/api/react/interface.dataprocessordefinition.mdx) 进行初始数据处理结束的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
154+
155+
该属性仅当 `frameworkRenderingTiming` 存在于 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 时有效。
156+
157+
### setInitDataStart
158+
159+
```tsx
160+
setInitDataStart: number;
161+
```
162+
163+
[更新初始数据](/guide/use-data-from-host-platform#提供和更新数据)开始的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
164+
165+
该属性仅当 `frameworkRenderingTiming` 存在于 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 时有效。
166+
167+
### setInitDataEnd
168+
169+
```tsx
170+
setInitDataEnd: number;
171+
```
172+
173+
[更新初始数据](/guide/use-data-from-host-platform#提供和更新数据)结束的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
174+
175+
该属性仅当 `frameworkRenderingTiming` 存在于 [LoadBundleEntry](/api/lynx-api/performance-api/performance-entry/load-bundle-entry) 时有效。
116176

117177
## 兼容性
118178

119179
import { LegacyCompatTable } from '@lynx';
120180

121-
<LegacyCompatTable metadata="lynx-api/performance-api/framework-pipeline-timing" />
181+
<LegacyCompatTable metadata="lynx-api/performance-api/framework-rendering-timing" />

docs/zh/api/lynx-api/performance-api/performance-entry/load-bundle-entry.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ paintEnd: number;
201201

202202
基于 UI 和 UITree,完成最终像素化的结束时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
203203

204-
### frameworkPipelineTiming
204+
### frameworkRenderingTiming
205205

206206
```ts
207-
frameworkPipelineTiming: FrameworkPipelineTiming[keyof FrameworkPipelineTiming];
207+
frameworkRenderingTiming: FrameworkRenderingTiming;
208208
```
209209

210-
[框架渲染](/guide/spec#framework-rendering)中关键阶段的性能数据. 类型为 [`FrameworkPipelineTiming`](/api/lynx-api/performance-api/framework-pipeline-timing)
210+
[框架渲染](/guide/spec#framework-rendering)中关键阶段的性能数据. 类型为 [`FrameworkRenderingTiming`](/api/lynx-api/performance-api/framework-rendering-timing)
211211

212212
## 兼容性
213213

docs/zh/api/lynx-api/performance-api/performance-entry/pipeline-entry.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { RuntimeBadge } from '@lynx';
44

55
`PipelineEntry` 负责记录 [Lynx Pipeline](/guide/spec#lynx-pipeline)[框架渲染(Framework Rendering)](/guide/spec#framework-rendering)[引擎渲染(Pixel Pipeline)](/guide/spec#pixel-pipeline)关键时刻的性能数据,继承自 [`PerformanceEntry`](../performance-entry)
66

7-
Lynx Pipeline 是指从渲染触发到最终显示的完整流程。该流程分为四个主要部分:加载(Load)解析(Parse)框架渲染(FrameworkPipeline)、引擎渲染(PixelPipeline)
7+
Lynx Pipeline 是指从渲染触发到最终显示的完整流程。该流程分为四个主要部分:[加载(Load)](/guide/spec.html#load)[解析(Parse)](https://lynxjs.org/guide/spec.html#parse)[框架渲染(Framework Rendering)](/guide/spec#framework-rendering)[引擎渲染(Pixel Pipeline)](/guide/spec#pixel-pipeline)
88

99
由于 Lynx Pipeline 触发频繁,框架仅统计以下两种情况:
1010

@@ -169,15 +169,15 @@ layoutUiOperationExecuteEnd: number;
169169
paintEnd: number;
170170
```
171171

172-
基于 UI 和 UITree,完成最终像素化的结束时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
172+
执行[绘制](/guide/spec#paint)结束的时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。
173173

174-
### frameworkPipelineTiming
174+
### frameworkRenderingTiming
175175

176176
```ts
177-
frameworkPipelineTiming: FrameworkPipelineTiming[keyof FrameworkPipelineTiming];
177+
frameworkRenderingTiming: FrameworkRenderingTiming;
178178
```
179179

180-
[框架渲染](/guide/spec#framework-rendering)中关键阶段的性能数据. 类型为 [`FrameworkPipelineTiming`](/api/lynx-api/performance-api/framework-pipeline-timing)
180+
[框架渲染](/guide/spec#framework-rendering)中关键阶段的性能数据. 类型为 [`frameworkRenderingTiming`](/api/lynx-api/performance-api/framework-rendering-timing)
181181

182182
## 兼容性
183183

packages/lynx-compat-data/lynx-api/performance-api/framework-pipeline-timing.json renamed to packages/lynx-compat-data/lynx-api/performance-api/framework-rendering-timing.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"lynx-api": {
33
"performance-api": {
4-
"framework-pipeline-timing": {
5-
"FrameworkPipelineTiming": {
4+
"framework-rendering-timing": {
5+
"FrameworkRenderingTiming": {
66
"__compat": {
77
"description": "",
8-
"lynx_path": "api/lynx-api/performance-api/framework-pipeline-timing",
8+
"lynx_path": "api/lynx-api/performance-api/framework-rendering-timing",
99
"support": {
1010
"android": {
1111
"version_added": "3.1"

packages/lynx-compat-data/lynx-api/performance-api/performance-entry/load-bundle-entry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
}
361361
}
362362
},
363-
"frameworkPipelineTiming": {
363+
"frameworkRenderingTiming": {
364364
"__compat": {
365365
"description": "",
366366
"lynx_path": "api/lynx-api/performance-api/performance-entry/load-bundle-entry",

0 commit comments

Comments
 (0)