Android Developers Blog: Precise Improvements: How TikTok Enhanced its Video Social Experience on Android
Article Summary
TikTok slashed app startup time by 45% and reduced video lag by 27%. Here's how they did it using Android's native toolchain.
With 1 billion daily users on diverse devices and network conditions, TikTok's Android team faced a critical challenge: maintaining smooth performance while rapidly adding features. They turned to Android's performance tools and Jetpack libraries to systematically tackle jank, slow startup, and video playback issues.
Key Takeaways
- Refactored startup framework with App Startup library for on-demand component loading
- Used Layout Inspector to simplify View hierarchy and distribute tasks across frames
- Created pooled media player instances per codec, running in separate threads
- Implemented dynamic buffer adjustment and on-device video super-resolution
- First frame appears 41% faster with 49% improvement in frame rate smoothness
By leveraging Android Studio Profiler, Systrace, and Jetpack libraries, TikTok achieved a 1% increase in active days per user and higher session duration.
About This Article
As TikTok added features quickly, the app started hitting performance walls. Users saw stuttering frames, videos took time to load, and network problems popped up, especially for people on older phones or slower connections around the world.
TikTok's engineers used Android Studio's Profiler to watch CPU, memory, and network usage in real time. They ran Simpleperf to dig into how the code actually executed, then used Systrace and Perfetto to capture what the system was doing at each moment.
After these fixes, users came back more often and spent longer in the app. Ratings on Google Play went up and surveys showed people were happier with how it worked.