Striving for iOS App Performance
Article Summary
Strava's iOS app was slowing down as they scaled to 1 billion activities in 18 months. Their solution? A ruthless focus on "Time to Something Useful."
The Strava engineering team tackled app performance by measuring what matters most: how fast users see actual content after tapping the app icon. They overhauled their dependency injection, optimized API calls, and built robust instrumentation to catch regressions.
Key Takeaways
- Created TTSU metric: time from app tap to displaying feed content
- Migrated to Swift-based dependency injection, deferring graph initialization
- Started API requests early while other dependencies loaded in parallel
- Used OSSignpost, Time Profiler, and production analytics for measurement
- Removed anti-patterns like options dictionaries that instantiated unused dependencies
Critical Insight
By auditing their dependency graph, optimizing injection timing, and instrumenting both dev and production builds, Strava exceeded their performance targets in just a few months.