Android & Jetpack Compose (50 Qs)•Part 3: ART Internals, Memory Leak Profiling & Production Hardening (25 - 35)
How do you benchmark and profile UI performance using Macrobenchmark?
senior LevelFormsPerformanceMemory Management
In Simple Words:
- Traditional microbenchmarks test small code loops in isolation.
- Macrobenchmark: Runs on a real Android device/emulator, driving the app through end-to-end user journeys (scrolling a list, app cold start).
- Measures frame drops (Jank, > 16ms per frame for 60fps), Time to Initial Display (TTID), and Time to Full Display (TTFD), generating Systrace dumps.