Back Market Florian Le Ficher Dec 12, 2024

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

Critical Insight

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.

The team also discovered how the Android 12 Splash Screen API was artificially inflating their startup metrics in an unexpected way.

About This Article

Problem

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.

Solution

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.

Impact

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.