compose-performance-audit

Analyze Jetpack Compose code for performance bottlenecks and suggest optimizations.

Updated May 29, 2016
One-click install
npx skills add https://github.com/AerisG222/maw-photos-android --skill compose-performance-audit-aerisg222
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-performance-audit
Source: https://github.com/AerisG222/maw-photos-android/tree/main/.github/skills/compose-performance-audit
Command: npx skills add https://github.com/AerisG222/maw-photos-android --skill compose-performance-audit-aerisg222

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps diagnose and fix performance issues in Jetpack Compose UI, such as slow rendering, janky scrolling, and excessive recompositions, leading to smoother and more responsive Android applications.

Core Features & Use Cases

  • Code Review: Analyzes composable code for common performance pitfalls like unstable parameters, missing remember, and inefficient state handling.
  • Profiling Guidance: Guides users on how to collect performance data using Android Studio's Layout Inspector and Perfetto traces.
  • Remediation: Provides concrete code fixes and refactoring suggestions to improve recomposition efficiency and reduce rendering times.
  • Use Case: If your Compose-based list is scrolling poorly, this Skill can help identify why items are recomposing too often and suggest how to fix it using stable keys and optimized state management.

Quick Start

Analyze the provided Jetpack Compose code snippet for performance bottlenecks and suggest optimizations.

Frequently Asked Questions about compose-performance-audit

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

FAQPage Schema
Why does my Jetpack Compose list scroll poorly and how can I fix excessive recompositions?

Excessive Jetpack Compose recompositions often stem from unstable parameters or missing stable keys. You can fix poor scrolling performance by analyzing composable code for inefficient state handling and applying refactoring steps to optimize recomposition efficiency.

How do I profile Jetpack Compose UI performance bottlenecks?

You can profile Jetpack Compose UI performance by collecting performance data using Android Studio's Layout Inspector and Perfetto traces. This guides you through identifying slow rendering, janky scrolling, and heavy work occurring in the composition phase.

What causes recomposition storms in Jetpack Compose and how do I prevent them?

Recomposition storms in Jetpack Compose are typically caused by unstable parameters, missing remember calls, and heavy work executed directly in composition. Prevent them by applying stable keys, optimizing state management, and refactoring inefficient composables.

Do I need to understand Compose stability models to optimize Android UI performance?

Yes, understanding Jetpack Compose's stability model and state management is required to effectively audit and improve UI performance. This knowledge is essential for diagnosing layout thrash and implementing remediation steps for rendering issues.

How do I identify missing remember calls causing janky scrolling in Jetpack Compose?

To identify missing remember calls causing janky scrolling in Jetpack Compose, conduct a code review analyzing composables for inefficient state handling. This process isolates performance pitfalls and provides concrete code fixes to reduce rendering times.