How Uber Deals with Large iOS App Size
Article Summary
Raj Barik, Milind Chabbi, and Jin Lin from Uber reveal how they slashed iOS app size by 23% using compiler magic. The secret? Machine code patterns follow a power-law distribution, just like human language.
Uber's iOS apps were hitting Apple's over-the-air download limits, causing a 10% drop in installations and 20% reduction in first-time bookings. The team discovered that instruction sequences in compiled code repeat frequently in predictable patterns, opening the door to aggressive optimization through a technique called machine outlining.
Key Takeaways
- 23% code size reduction in Rider app (17% Driver, 19% Eats)
- New whole-program compilation pipeline enables cross-module optimization opportunities
- Repeated machine outlining extracts 27% more savings than standard approach
- 3.4% performance improvement as bonus from reduced instruction footprint
- 2x reduction in code growth rate over time
By applying repeated machine outlining at the whole-program level instead of per-module, Uber reduced app size by 23% while actually improving performance by 3.4%.
Continue reading
This page summarizes “How Uber Deals with Large iOS App Size” by Uber, published Feb 26, 2021. All credit for the original work goes to the authors.