Runtime Performance
Runtime performance focuses on smoothness during miniapp use. Good runtime performance means fluid page scrolling, responsive interactions, and natural animations.
Common Performance Issues
Miniapp Architecture and Performance
Tuya miniapps use a dual-thread architecture:
- Logic layer: Runs developer JavaScript code, handles data and business logic
- View layer: Responsible for page rendering and user interaction
The two threads communicate by passing data through messages. setData is the primary way the logic layer sends data to the view layer, so how setData is used directly impacts runtime performance.
Understanding this architecture is the foundation of runtime performance optimization.
Optimization Guides
- Using setData Wisely - The most critical optimization point
- Render Performance Optimization - Reduce rendering overhead
- Resource Loading Optimization - Image and asset loading optimization
- Memory Optimization - Avoid memory issues
Related Documents
- FPS Performance Analysis - Check frame rate during runtime