compose-performance-audit

Diagnose Jetpack Compose rendering, jank, and recomposition issues using Perfetto traces.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/thinhtt264/Snaplet-App --skill compose-performance-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-performance-audit
Source: https://github.com/thinhtt264/Snaplet-App/tree/main/.cursor/skills/compose-performance-audit
Command: npx skills add https://github.com/thinhtt264/Snaplet-App --skill compose-performance-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineers diagnose and optimize Jetpack Compose runtime performance, addressing slow rendering, jank, and excessive recompositions.

Core Features & Use Cases

  • Code-First Review: Collect target composable code, data flow, and reproduction steps to identify recomposition storms, unstable keys, and heavy work in composition.
  • Guided Profiling: Lead the user to gather Layout Inspector data, enable recomposition highlights, and collect Perfetto traces for root-cause analysis.
  • Remediation Guidance: Provide concrete fixes, such as stabilizing parameters, using remember, and reducing layout complexity.

Quick Start

Apply the compose-performance-audit skill to a Compose UI project by providing a target composable and reproduction steps, then attach Layout Inspector or Perfetto traces for analysis.

Frequently Asked Questions about compose-performance-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Jetpack Compose jank and slow rendering?

To fix Jetpack Compose jank, audit your composable code and data flow to identify excessive recompositions, then use Layout Inspector and Perfetto traces to guide root-cause analysis and apply concrete fixes like stabilizing parameters.

What causes excessive recompositions in Android Compose?

Excessive recompositions in Android Compose are typically caused by unstable parameters, unstable keys, or heavy work executing directly within the composition phase, requiring data flow analysis to diagnose and remediate.

How do I use Perfetto traces to diagnose Compose performance issues?

You use Perfetto traces to diagnose Compose performance issues by collecting target composable code, reproduction steps, and trace data, which enables evidence-based root-cause analysis for slow rendering and jank.

Can Layout Inspector detect recomposition storms in Jetpack Compose?

Yes, Layout Inspector can detect recomposition storms in Jetpack Compose by enabling recomposition highlights to visually identify which composables are recomposing excessively and guide remediation.

What is the best way to optimize Compose UI performance during code review?

The best way to optimize Compose UI performance during code review is to analyze the target composable code and data flow to spot recomposition storms and heavy work, then verify findings using macrobenchmarks and Perfetto traces.

Why does my Jetpack Compose layout have high complexity and how do I reduce it?

Your Jetpack Compose layout has high complexity due to nested composables and heavy work in composition; reduce it by using remember, stabilizing parameters, and simplifying the layout hierarchy.