How We Enhanced Our Android App’s Startup Time by Over 50%
Article Summary
Back Market slashed their Android app startup time by 60%. Here's the engineering breakdown that made it happen.
Florian Le Ficher from Back Market's engineering team shares the multi-month journey to dramatically improve their app's cold start performance. They used Android Vitals, Firebase, and Datadog to measure impact, then systematically tackled the biggest bottlenecks.
Key Takeaways
- Deferring SDK initialization cut startup time by 35% alone
- App startup profiles reduced load time by 15% with simple implementation
- Feature flag SDK was doing disk I/O on main thread, adding 150ms delay
- Baseline profiles and moving operations to IO threads delivered major wins
- Android Vitals showed slow cold starts dropped from 5% to 2% of sessions
By deferring SDK initialization, eliminating main thread I/O, and implementing baseline profiles, Back Market reduced their P90 cold start from 1.5s to under 0.6s.
About This Article
Back Market's Android app had a P90 cold startup time of 1.5 seconds at the start of the year. The measurements were inconsistent across different tools like Datadog and Google Play Store, making it hard to track real progress.
The team implemented baseline profiles to pre-compile essential code paths and used app startup profiles to optimize DEX file layout. They also created custom Initializer classes based on Google's App Startup library, which let them move non-critical SDK initialization to background threads instead of blocking the startup sequence.
After migrating to Android 12 Splash Screen APIs and deferring SDK initialization, Back Market cut their P90 cold start time down to 0.6 seconds. Android Vitals data showed slow cold start sessions dropped from 5% to 2% of users.