Context
The ed-tech company builds an iOS app for each school on Azure DevOps. I investigated why those builds were so slow, as part of the build platform work.
The problem
A warm iOS build for one school took a median of 157 minutes, across a fleet of about 660 apps.
What I did
I profiled the pipeline to find where the time went.
I added shared caching for node_modules, CocoaPods, ccache and Metro.
I pinned CocoaPods to the lockfile, so cached pods match what is built.
I also stopped pull requests from triggering the iOS release pipeline, and moved the pipeline to keyless federation instead of stored cloud credentials.
Key decision
I cached the compile output and the dependencies together instead of tuning one stage. ccache helps only if Pods and node_modules are stable, so the caches depend on each other.
The cost is cache invalidation: a warm hit is fast, and a cold miss is still slow.
Result
Warm iOS builds went from a 157-minute median to about 30 minutes, roughly 5.5 times faster. The compiler cache reached a 99.8% hit rate.
What I learned
I would again measure per-stage time before choosing a fix. I would also report the cold-cache number alongside the warm one, because the headline only holds when the cache is warm.
Stack
- Azure DevOps
- Xcode
- CocoaPods
- ccache
- Metro
- fastlane
