目录

ArkUI Analysis

Function Description

The ArkUI analysis template is intended to identify frame freezing and frame loss issues caused by prolonged component execution, inefficient page layout, and state variable updates. Common scenarios include: performance issues caused by excessive layout nesting; inefficient data structure design where the app uses a large object and updates only certain properties, yet unchanged properties are also updated, causing redundant refreshes; child components redundantly binding to the same state variable in a parent component for updates; and incorrect decorator usage, such as using @Prop to pass a large object for deep copy.

The ArkUI analysis template supports the following lanes: APP Frame, ArkUI Component, ArkUI State, ArkTS Callstack, Callstack, CPU Core, and Process. This section describes the ArkUI Component and ArkUI State lanes. For details about other lanes, see the corresponding template.

Before analysis, create an ArkUI analysis task and capture related data. For details, see In-depth Capture for Problem Locating. Alternatively, click Open File in the session area and import historical data.

Checking the Component Drawing Duration

You can obtain statistics such as the component drawing frequency and duration from the ArkUI Component lane.

  1. Drag the mouse on the timeline to select a time period.
  2. The Summary tab displays the drawing statistics of custom components and system components during the recording, including draw count, total duration, minimum duration, average duration, maximum duration, and duration standard deviation.

  3. On the Details tab, you can view component details by timeline. In addition, the More pane displays information about the component tree where the component is used as the root node.

  4. Click a bar in the ArkUI Component lane to display the Slice Detail pane. You can click Name in the panel to redirect to the corresponding Process sub-lane, with the trace information selected. In addition, the More pane displays information about the component tree where the component is used as the root node.

    Due to privacy and security policies, the ArkUI Component lane is not available for apps that have been released on AppGallery.

Checking Status Variable Changes

  1. Click the ArkUI State lane. Inspect changes in state variables that occurred during the recording in the data area below the lane.

    • The Summary tab displays the names, the number of changes, types, owning components, and owning classes of state variables.

    • The Current Value tab displays the changes in state variables in chronological order. The Current Values column shows the value after the change. Select a data record in the Current Value tab. The time position of the data record is displayed in dotted lines in the lane area. The More pane on the right displays the component associations affected by the state variable. Turn on the Delivery Chain switch at the bottom of the page to view a diagram of the components affected by the state variable.

  2. Locate the time point of state variable change that may cause jank, select the corresponding time range, and choose the ArkUI Component lane to view the update time of the corresponding component.

  • Due to privacy and security policies, the ArkUI State lane is not available for apps that have been released on AppGallery.