Kotlin Adoption at Scale
summary
Facebook migrates Kotlin into a massive mono-repo with hundreds of thousands of modules and tens of millions of lines, so usual Gradle/Android Studio workflows break: Kotlin compiles 2–2.5× slower than Java in some cases, IDE indexing exhausts memory, and lambda/data-class sugar inflates DEX. Engineering adds Buck support, generates ABI jars during the fast parse phase via a compiler plugin, applies lambda grouping and data-class annotation plugins, and uses Redex/R8/ProGuard; results include 35% fewer modules rebuilt, ~10% faster builds from parallel ABI generation and large reductions in dependency graph depth.
AI-written summary · about
chapters (25)
- 0:00Introduction and speakers
- 1:19Kotlin adoption at Facebook
- 2:24Typical vs large-scale Kotlin projects
- 5:13Writing Kotlin code at scale
- 8:24Android Studio performance issues
- 10:53Biggest Kotlin integration problems
- 14:09Kotlin tooling and static analysis
- 17:03Kotlin code formatting challenges
- 19:53Kotlin library preparation
- 22:03Build systems for Kotlin
- 25:14Kotlin compilation speed issues
- 28:10Java bytecode optimization with JARs
- 31:43Parallel compilation improvements
- 34:33Build graph optimization results
- 36:40Kotlin build optimizations
- 43:49Android pipeline and app size
- 46:40Code shrinking and optimizers
- 49:08Kotlin-specific optimizations
- 51:34Why Kotlin needs special optimizations
- 55:30Lambda grouping for size reduction
- 58:44Data class optimizations
- 1:00:33Operator overloading and size impact
- 1:02:02Benchmarking Kotlin features
- 1:03:27Final thoughts and takeaways
- 1:05:59Q&A session
