~/talk

How to make Kotlin compile 2x faster

Talkat droidcon New York 2024 · 2024-09-19..09-20· [kotlin, devops-and-delivery]
links:none on file
links:none on file
slides:none on file

Large monorepo (≈5 million lines, ~1,000 modules, ~6,600 Android engineers, ~6k builds/day) cuts Kotlin compile time by changing concrete things: remove unused dependencies and flatten task graph, move plugin declarations into the module that needs them, split big modules and use SPI/DI to reduce upstream rebuilds, and pack Kotlin incremental intermediates into the cache as a baseline cache so cached outputs become incremental-ready. Result: Kotlin compiler cache hits rise ~30% → ~90%, average build time drops 30–70% (full build ~20min → 3–4min). class path isolation modularize and single-responsibility

AI-written summary · about

  1. 0:00Introduction
  2. 2:50Build speed importance
  3. 4:35Beyond hardware upgrades
  4. 7:23Gradle cache basics
  5. 9:29Unused dependencies removal
  6. 12:20Modularizing projects
  7. 19:09Classpath isolation
  8. 27:16Custom cache packs
  9. 30:29Baseline cache
  10. 34:29Optimization summary
  11. 36:57Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.