A Mini Program requires no installation, but that also makes users less willing to wait. A blank screen after scanning, a first-screen skeleton that remains too long, or a subpackage that begins downloading only after a tap makes the “lightweight app” feel anything but light.
First separate the time spent on startup download, code execution, data requests, and page rendering. Then decide whether to reduce package size, change APIs, or redesign the first screen.
01 Keep Only Essential First-Screen Content in the Main Package
Place the default launch page, TabBar, and shared foundations in the main package. Split low-frequency business functions, campaigns, and management pages by route. Control shared resources as well—do not put everything in the main package merely because multiple pages might use it.
Subpackage rules and size limits can change with the platform. Before release, verify them with WeChat DevTools and the current official documentation.
02 Show Structure First, Then Load Noncritical Content
When users enter the homepage, they first need navigation, the primary task, and basic status. Recommendations, complex charts, long lists, and low-priority APIs can load later.
More concurrent requests are not always faster. Too many APIs compete for network and rendering resources, so combine, cache, or prioritize them.

Quickly Locating Mini Program Performance Problems
| Symptom | Inspect First | Optimization Direction |
|---|---|---|
| Blank screen on first open | Main package download, synchronous initialization, first-screen rendering | Reduce the main package, defer tasks, provide a stable first screen |
| Long wait entering a page | Subpackage download, page resources, APIs | Preload likely subpackages and reduce page dependencies |
| Janky list scrolling | Too many nodes, frequent setData, images | Pagination, virtual lists, smaller update scope |
| Slow images | Original files, CDN, dimensions, formats | Output for display size, compress, use placeholders and caching |
| Page reloads after returning | Insufficient state and cache strategy | Preserve necessary state and use controlled cache expiry |
| Especially slow on some phones | Device differences, base library, compatibility | Monitor by device and version, not only the development phone |
03 Reduce Broad setData Calls and Unnecessary Updates
Update only fields that changed instead of repeatedly sending an entire large object or long list to the view layer. Control update frequency for high-frequency input, scrolling, and animation.
Deep component trees and excessive listeners also add cost. Use tools to locate hotspots before rewriting code based on intuition.

04 Prepare Images for Their Display Context
List thumbnails should not download full-resolution originals. Compress first-screen hero images and provide an appropriate crop. Prefer lightweight icon assets and avoid many fragmented requests.
Reserve image dimensions and provide a failure state to prevent the page from shifting repeatedly.
05 Use Caching and Preloading Selectively
Stable configuration, dictionaries, and recent user data can be cached, but define expiry, refresh, and cleanup rules. Incorrect or oversized caches also slow the product down.
Preload subpackages or data for a highly likely next page. Do not download every low-probability item in advance.

06 Evaluate the Cost of Every Third-Party Component and SDK
Customer service, analytics, maps, rich text, and marketing SDKs can all increase package size, startup time, and runtime overhead. For every dependency, confirm whether it is necessary, can load on demand, and is actively maintained.
Removing an unused component is often more effective than continuing to micro-optimize code.
07 Keep Observing on Real Devices and with Production Data
DevTools is useful for initial diagnosis, but final testing must cover phones at different performance tiers, networks, and WeChat versions.
After launch, monitor startup, requests, errors, and exits by screen, version, and device. One optimization effort cannot replace continuous monitoring.
Frequently Asked Questions
How large should the Mini Program main package be?
The platform sets explicit limits, but the values can change. Follow current official documentation and DevTools, and keep only first-screen essentials in the main package.
Are more subpackages always better?
No. Too many subpackages increase management overhead and waiting on first entry. Divide them according to business boundaries and access probability.
Can a Mini Program use skeleton screens?
Yes, but the skeleton should be stable, resemble the real content, and reveal interactive elements quickly. It should not hide persistently slow requests.
Will placing every image on a CDN make them fast?
A CDN helps, but oversized originals, mismatched dimensions, and too many requests still create delays.
Can performance optimization affect functionality?
Yes, so establish a baseline and tests first. After optimization, validate data, state, compatibility, and error recovery rather than measuring speed alone.
| Service | View |
|---|---|
| Related services | View service details |
| Project inquiry | Contact JVDS |
| Design and web articles | View articles |