Performance and Experience
Why Optimize Performance
Miniapp performance is closely tied to user experience. During use, users may encounter the following issues:
- Slow startup: Long wait time after opening the miniapp
- Page lag: Frame drops when scrolling lists or interacting
- Response delay: Buttons don't respond promptly
- Long blank screen: Page content takes too long to appear
These issues seriously affect user willingness to use the miniapp and lead to churn. As features iterate and pages grow, performance problems become more prominent. Developers should invest in performance optimization alongside feature development to ensure a good user experience.
Two Main Themes of Performance Optimization
Miniapp performance optimization primarily covers two directions: startup performance and runtime performance.
Startup Performance
Startup performance focuses on the time from when a user opens the miniapp to when the first screen content is visible. The shorter the startup time, the faster users enter the miniapp and the lower the churn rate.
Startup performance optimization includes:
- Launch Process - Understand each phase of miniapp startup
- Package Size Optimization - Reduce package size for faster download
- Code Injection Optimization - Optimize code execution efficiency
- First Screen Render Optimization - Speed up first screen display
Runtime Performance
Runtime performance focuses on smoothness during miniapp use. Good runtime performance means smooth scrolling, responsive interactions, and fluid animations.
Runtime performance optimization includes:
- Using setData Wisely - Optimize data update patterns
- Render Performance Optimization - Reduce rendering overhead for nodes, lists, and animations
- Resource Loading Optimization - Image lazy loading, format and size optimization
- Memory Optimization - Avoid memory leaks and overflow
User Experience Optimization
Beyond performance, the following also affects overall user experience:
- Multi-device Adaptation - Notch screen, safe area, and other adaptation strategies
- Skeleton Screen - Reduce perceived loading time
How to Start Optimizing
1. Use Analysis Tools to Locate Issues
Before optimizing, understand the current performance status of your miniapp. Start with Startup Performance Analysis and FPS Performance Analysis to locate bottlenecks in the startup and runtime phases, then use Experience Score for an overall experience check.
2. Optimize by Priority
Recommended optimization priority:
3. Monitor Continuously
Performance optimization is an ongoing process. After each version iteration, use analysis tools to check performance metrics and ensure new features haven't introduced performance regressions.