Startup Performance

Miniapp startup is a critical part of the user experience. Long startup times lead to user churn and negatively impact retention.

What Is Miniapp Startup

Miniapp startup has two types:

TypeDefinitionCharacteristics
Cold startFirst open, or re-open after the system has destroyed the miniappRequires the full startup flow; takes longer
Warm startMiniapp is already running in the background and user returnsNo reload needed; nearly instant

The startup performance optimization discussed in this section focuses on the cold start scenario.

Definition of Startup Time

The miniapp startup process begins when the user opens the miniapp and ends when the home page finishes rendering.

  • Start point: User taps the miniapp entry
  • End point: The first page's Page.onReady event fires

Startup Time Guidelines

ScenarioRecommended Time
First open (with download)< 3000ms
Subsequent opens (using local cache)< 1500ms

Startup Optimization Directions

The following phases in the miniapp startup flow are developer-controllable:

DirectionGoalDetails
Package size optimizationReduce download size and speed up downloadPackage Size Optimization
Code injection optimizationReduce code execution timeCode Injection Optimization
First screen render optimizationSpeed up page content displayFirst Screen Render Optimization

For complete startup flow details, see Launch Process.