How We Improved Our Android Apps Performance by Up to 24%
Article Summary
Mercado Libre's Android team achieved a 24% performance boost without using Google's recommended Baseline Profiles or Macrobenchmark tools. How did they pull it off?
The performance engineering team at Mercado Libre (Latin America's largest e-commerce platform) tackled cold startup times for their Mercado Pago and Mercado Libre apps. With 19% of users on low-end devices, they needed creative solutions that didn't rely on the latest Android tooling.
Key Takeaways
- Reduced excessive list iterations and removed non-critical startup configurations
- Optimized coroutine usage: single scope proved 9% faster than parallel launches
- Implemented custom thread pool with max priority for startup tasks
- Postponed analytics tracking by 5 seconds to free up resources
- Results: 1.5M daily users now start apps under 5 seconds
By refactoring their startup algorithm across five key areas, Mercado Libre improved cold startup by up to 24% and cut non-compliant sessions in half.
About This Article
Mercado Libre's apps were slow to start because they stacked many configuration tasks that depended on each other. These tasks needed to be sorted to avoid crashes, which created serious bottlenecks on cheaper Android devices.
Victor Oliveira's team rewrote the configurator algorithm to stop stacking tasks. Instead, configurations now run one after another without needing to sort dependencies first, which cut down startup overhead.
Mercado Pago saw a 23-58% performance improvement from the new algorithm. Cold startup times improved 24% at the p90 level, and non-compliant sessions dropped 29% over 30 days in production.