Measuring Kotlin Build Performance
Article Summary
Uber ran 129 experiments across 354 projects to answer one question: What's the real cost of adopting Kotlin at scale?
Uber's Mobile Engineering team partnered with JetBrains to measure Kotlin build performance across their massive Android monorepo with 2,000+ modules. They generated 1.4 million lines of code in 13 different configurations to understand the tradeoffs of different project structures and tooling choices.
Key Takeaways
- Kotlin reduced source code by 40% compared to functionally equivalent Java
- Kapt added 95% overhead versus pure Kotlin without annotation processing
- Error Prone static analysis contributed 70% overhead on Java builds
- Mixed Kotlin/Java in same module showed measurable performance impact
- 95% of engineers willing to accept slower builds to use Kotlin
Critical Insight
Compilation time grows linearly with project size, but annotation processing (Kapt) and mixed source sets create the biggest performance bottlenecks in Kotlin builds.