Camera
Camera copied to clipboard
Measure build performance before Compose migration
Baseline before Compose
Pixel 8a, Android 17, benchmark build, compiled with verify, commit 9c53745b.
Median (p90). Startup n=10, idle n=3, others n=5.
| Scenario | Metric | Value |
|---|---|---|
| Cold start | TTID | 239 ms (249) |
| TTFD (preview streaming) | 477 ms (495) | |
| activityStart | 89 ms (103) | |
| inflate | 36 ms (38) | |
| RSS | 163 MiB (168) | |
| Settings sheet, 5 opens | frame CPU p90 / p99 | 1.2 / 43 ms |
| inflate | 76 ms (128) | |
| app jank | 0.7% (1.7) | |
| Mode swipes | frame CPU p90 / p99 | 2.3 / 4.7 ms |
| app jank | 9.9% (12.1) | |
| Pinch zoom | frame CPU p90 / p99 | 4.0 / 6.8 ms |
| app jank | 0% | |
| Gallery, 20 swipes | frame CPU p90 / p99 | 2.5 / 5.9 ms |
| app jank | 0.9% (1.1) | |
| RSS | 373 MiB (431) | |
| Idle viewfinder, 30 s | app frames | 0 |
| main thread CPU | 48 ms (50) | |
| RSS | 165 MiB (168) |
Notes
- Opening the settings sheet costs one ~44 ms frame every time.
- Mode switch jank comes from the camera rebind blocking the main thread, not from drawing.
- Zoom has no jank; the idle viewfinder draws no frames.
- About half of TTFD is the camera opening after the first frame, so compare TTID and activityStart.
- Frame counts and total CPU depend on how long a manual run took. Compare percentiles, jank % and RSS.