# Startup performance
Mini Program startup is an extremely important part of the Mini Program user experience, and too long a startup time will cause the loss of Mini Program users and affect the user experience.
Of this chapter.start-upSpecifically refers to the cold start of the Mini Program, excluding the hot start of the Mini Program background cut to the foreground. About Cold/Definition of hot start, please refer to theMini Program operation mechanism
# 1. Definition of Small Program Startup
Start Process of Mini ProgramwithUser Opens Mini ProgramFor the starting point, to the Mini ProgramHome Rendering Completeuntil。
User Opens Mini ProgramMay be triggered by the user clicking on the access, or may be through scanning a code, Mini Program jumping Mini Program or APP Open the Mini Program and other entry triggers. From scanning code, APP When the scene opens the Mini Program, there may be a pre-jump and verification process, which is not included in the discussion of the Mini Program start-up process.
Mini ProgramHome Rendering CompleteThe logo is the first page. Page.onReady
Event triggered. Due to differences in the startup process, the Mini Program definedHome Rendering CompleteIs not equivalent to the browser's DOMContentLoaded
or load
Events.
To understand the specific process of Mini Program startup, refer to theSmall Program Start ProcessIntroduction of the chapters.
# 2. Open rate/Arrival rate
Mini ProgramHome Rendering CompleteNumber andMini Program startThe ratio of times is also known as the (PV) opening rate or (PV) arrival rate. Corresponding to the Attrition rate = 1 - Open rate
。
The opening rate is affected by the following factors:
- Startup performance: The longer it takes to start, the longer the white screen time, the more likely the user is to quit the Mini Program because of impatience, and the lower the opening rate.
- User Willingness to Wait: The stronger the user's willingness to wait, the longer the wait time will be, and the higher the open rate will be if the startup time is consistent. The user's willingness to wait is related to scenarios in which the Mini Program is used, such as:
- Scanning code, search and other scenarios with strong user purpose, usually more willing to wait.
- In the advertising scenario, the user's willingness to wait is low, and it is more necessary to optimize the startup performance in order to obtain a higher open rate.
# 3. Startup performance optimization
In the process of Mini Program startup, the time of code package preparation, Mini Program code injection and home page rendering is related to the Mini Program itself, and developers can do some optimization work. The other parts of the time spent by the Mini Program framework side is responsible for continuous optimization.
Developers can start by optimizing startup performance in the following ways:
In addition to the above three parts, there are some factors that will have an impact on the start-up time of the Mini Program.Other Optimization Recommendations
If you want to better understand and analyze the performance of the Mini Program, you can refer toPerformance DataChapters. On average, we recommend that the startup time of a Mini Program should be limited to:
Android | iOS | |
---|---|---|
When you need to download or update | 3.7s | 1.8s |
When using local code packages | 2.6s | 0.9s |
Average market average | 3.0s | 1.2s |