目录

Basic Operations with Launch Analysis

Function Description

Startup speed is an important indicator during app/atomic service development. To identify bottlenecks in app startup time and speed up cold start, you can use the launch analysis provided by DevEco Profiler to capture and analyze key data during the startup and identify the cause of slow startup.

The Launch analysis template supports the following lanes: Launch, Frame, ArkTS Callstack, Callstack, Network Traffic, Network Request, CPU Core, and Process. This section describes the Launch lane. For details about other lanes, see the corresponding template.

  • Before analysis, create a Launch 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.
  • Launch analysis cannot be performed for release apps that cannot be started by commands.
  • Recording for the launch analysis can be performed when the device screen is locked.

Launch Modes

Before recording, the app launch mode can be either automatic or manual. You can toggle between these modes by simply clicking the corresponding icon.

Checking the Duration of Each Startup Phase

  1. Select one or more stages in the Launch lane chart. The Details area below displays the duration statistics for the selected stages.

    Expand the collapsible statistics table for each stage to view the detailed duration of individual tasks. Click the redirection button to navigate directly to the relevant thread trace task.

  2. In DevEco Studio 6.0.0 Beta1, the Load ETS Files area is available to display the loading status of ETS files during cold startup. The fields are described as follows:

    • Category: whether the ETS file is used during app launch.
    • Weight: total time taken to load the child node files (excluding the ETS file itself) of the ETS file.
    • Self: time taken to load the ETS file.
    • Import Count: number of times that the ETS file is imported by other files.
    • File Name: name of the ETS file.
    • Path: path to the build product of the ETS file.

  3. Click the TOP Redundant tab to view the information about the top 100 redundant ETS files loaded during the cold start. If a file name in the File Name column is displayed in blue, double-clicking it quickly navigates to the corresponding source file in the project.

For apps that have been released on AppGallery, you cannot view the ETS file loading information during cold start on the Load ETS Files or TOP Redundant tab.

Checking the Time Used to Load a Static Resource Library

  1. Expand the Launch lane. The Static Initialization sub-lane displays the duration required for loading each static resource library during the startup.
  2. Click a colored block for a static resource library, or drag to select multiple colored blocks for static resource libraries. The Details area below shows duration statistics for the selected objects.

    For a task that fails to complete loading within the expected time, you can click the redirection button to switch to the thread trace task for in-depth analysis.

Checking the Main Thread Running Status on a CPU Core

  1. Expand the Launch lane. The Running CPU Cores sub-lane displays the CPU core on which the main thread runs during the startup.
  2. Click a colored block for a single process, or drag to select multiple process blocks. The Details area below shows runtime statistics for the selected objects. Click the redirection button in the CPU column to navigate to the CPU Core lane for detailed scheduling information.

Checking the Thread Trace Data During the Startup

  1. Expand the Launch lane. In addition to the Static Initialization and Running CPU Cores sub-lanes, the status and trace data of key threads during the startup are also displayed.
  2. Click a slice block, or drag to select multiple slice blocks, to view details of the selected objects.

    • Details: displays the selected objects in a tree, including the task name, start time, and duration.
    • Thread States: displays thread state statistics.
    • Thread Usage: displays the thread usage.
    • Slice List: displays slice statistics of the selected objects.
    • Load Statistics: displays medium-load and heavy-load information of the selected objects.