Find the cause of UI jank in a recorded trace
Quand l'utiliser : User report: 'the app stutters when I scroll'. You captured a Perfetto trace. Now what?
Prérequis
- Perfetto .pftrace file — perfetto / systrace / Android Studio Profiler
Déroulement
-
Point MCP at the traceOpen /tmp/jank.pftrace for process com.example.app. Find jank frames — anything over 16.67ms on the main thread.✓ Copié→ List of janky frames with slice context
-
Attribute the causeFor the top 3 janky frames, what slice dominated? What was the main thread doing when the frame missed?✓ Copié→ Cause per frame
-
Propose fixBased on these bottlenecks, suggest concrete changes (move off main, cache, etc.).✓ Copié→ Fix plan
Résultat : Jank root cause identified without staring at the timeline UI.
Pièges
- Sample interval too coarse — missing short hot methods — Re-record with higher sampling frequency when needed