compose-performance-audit

Audit Jetpack Compose runtime performance to identify recomposition bottlenecks and rendering issues.

Updated Mar 9, 2025
One-click install
npx skills add https://github.com/rock-hu/vitamin-compose --skill compose-performance-audit-rock-hu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-performance-audit
Source: https://github.com/rock-hu/vitamin-compose/tree/main/.github/skills/compose-performance-audit
Command: npx skills add https://github.com/rock-hu/vitamin-compose --skill compose-performance-audit-rock-hu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit and improve Jetpack Compose runtime performance from code review and architecture. Use when asked to diagnose slow rendering, janky scrolling, excessive recompositions, or performance issues in Compose UI.

Core Features & Use Cases

  • Code-First Review: Collect target composables, data flow, and symptoms to identify root causes.
  • Profiling & Instrumentation: Guide use of Layout Inspector, Perfetto, and macrobenchmark results to quantify issues.
  • Remediation Guidance: Propose targeted fixes such as stabilizing keys, memoizing expensive computations, and reducing layout complexity.
  • Use Case: When a screen scrolls with frame drops, apply this Skill to pinpoint blocking recompositions and suggest fixes.

Quick Start

Provide the target Composable code and a brief description of the observed performance issue to initiate a Code-First Review.

Frequently Asked Questions about compose-performance-audit

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

FAQPage Schema
How do I find the cause of janky scrolling and frame drops in Jetpack Compose?

To fix janky scrolling in Jetpack Compose, a code-first review identifies excessive recompositions and blocking layout issues. It analyzes your target composables and data flow to pinpoint the specific bottlenecks causing frame drops.

How do I use Layout Inspector and Perfetto to audit Compose recompositions?

To audit Compose recompositions using Layout Inspector and Perfetto, you provide your composable code and observed symptoms. The review then guides you on where to instrument and how to quantify rendering issues using profiling data.

What is the best way to fix excessive recompositions in a Compose UI?

The best way to fix excessive recompositions in a Compose UI is through targeted remediation like stabilizing keys and memoizing expensive computations. It applies architecture-level code reviews to reduce layout complexity.

Can I use macrobenchmark results to diagnose slow rendering in Jetpack Compose?

Yes, you can use macrobenchmark results to diagnose slow rendering in Jetpack Compose. The audit process consumes this profiling data to quantify performance issues and validate that your remediation steps improve frame metrics.

Do I need to provide source code to analyze Compose UI performance?

Yes, you need to provide target composable source code to analyze Compose UI performance. The audit relies on a code-first review of your data flow and a description of observed symptoms to identify root causes and suggest fixes.