~/talk

Compile Kotlin faster with ABI

Talkat droidcon Berlin 2023 · 2023-07-05..07-07· [kotlin, developer-experience]
links:none on file
slides:none on file

Company converts from near zero to ~10 million Kotlin lines and finds builds slow; solution stacks practical measures: upgrade to Kotlin 1.7, switch annotation processors to KSP not KAPT, try K2 front-end which shows ~2x front-end speed wins in vendor benchmarks, enable compile-against-API with class or source-API generation to avoid recompiling dependents, split front and back end and run distributed workers/remote cache to reclaim parallelism. Implementations in Buck/Buck2 and Meta’s build tooling prove the ABI approach reduces rebuilds and boosts throughput.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 3:36Why Kotlin over Java at scale
  3. 5:48Build speed challenges and tradeoffs
  4. 7:59Types of Android builds explained
  5. 11:33Compiler throughput optimizations
  6. 14:48Classifying build optimizations
  7. 16:32Kotlin K2 compiler improvements
  8. 19:13Upgrading Kotlin compiler today
  9. 21:42KSP vs KAPT for annotation processors
  10. 22:47Parallel backend compilation
  11. 23:30Parallel graph execution in builds
  12. 26:46Remote execution and caching
  13. 28:58Key takeaways so far
  14. 29:20Using ABI to avoid unnecessary builds
  15. 34:24Challenges in Kotlin ABI generation
  16. 37:43Implementing ABI stages in builds
  17. 39:11Source API and dependency guessing
  18. 40:38Compilation avoidance techniques
  19. 41:45Summary and final recommendations
~/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.