The Compose Runtime, Demystified
summary
Jetpack Compose is a Kotlin UI runtime plus a Kotlin compiler plugin that rewrites composable functions into calls that manage a flat slot table (gap buffer). The runtime implements positional memoization and schedules recomposition when observed state changes, using compiler-generated call-site keys and a lightweight remember/state API. The implementation is early but live, works off the Android platform, and demonstrates concrete tradeoffs: constant-time slot ops, costly gap moves on structural changes, and room for compiler-driven skipping and parallelism.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 0:28Show of Hands
- 0:51Compose Runtime
- 2:33Kotlin Compiler Plugin
- 3:10caveats
- 3:58what is declarative
- 6:30declarative UI system
- 6:54anatomy
- 8:53suspend
- 11:18Composable functions
- 13:02Slottable
- 15:22composable function
- 16:48slot table
- 19:52If statement overhead
- 21:29Memoization
- 25:19Recomposition
- 25:38AppModel
- 28:39Observing Live Data
- 31:22Composable Example
- 32:15Static Parameter
- 34:39referential transparency
- 34:54referential transparency example
- 35:46ingredients for referential transparency
- 36:10are composable functions pure
- 36:29are readonly
- 37:25skippable
- 38:31UI library
- 39:33Compose
- 39:53Compose Slack
related talks
40mJetpack Compose Mechanisms
32mJetpack Compose — Next Gen Kotlin UI Toolkit for Android
28mA Hitchhiker's Guide to Compose Compiler: Composers, Compiler Plugins, and Snapshots
19mJumping into Jetpack Compose way too early to see what's inside
01h 00mJetpack Compose - Next Gen Kotlin UI Toolkit for Android
45mFirst look at Jetpack Compose
29mA Hitchhiker's Guide to Compose Compiler: Composers, Compiler Plugins, and Snapshots
48mLearning Jetpack Compose By Example
