compose-performance

Identify and fix Jetpack Compose performance bottlenecks by reducing recompositions.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill compose-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-performance
Source: https://github.com/jperezdelreal/GymBro/tree/main/.squad/skills/android/compose-performance
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill compose-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compose performance issues in Android UIs, including frequent recompositions, heavy work in the composition phase, and inefficient list rendering, which degrade smoothness and energy efficiency.

Core Features & Use Cases

  • Remember vs rememberSaveable: Guidance on state survival across configuration changes and process death, and best practices for transient vs persistent state.
  • derivedStateOf and correct recomposition minimization: Use cases to derive values without triggering frequent recomposition.
  • LaunchedEffect keys and lifecycle: Proper key usage to restart effects only when dependencies change.
  • Modifier stability and hoisting: Hoist stable modifiers and avoid per-composition allocations.
  • LazyColumn optimization: Use keys and contentType to enable slot reuse and efficient rendering.
  • Offload heavy work to ViewModels: Move expensive computations away from composables.
  • AnimatedVisibility and transitions: Prefer AnimatedVisibility for enter/exit animations to reduce manual animation work.
  • Anti-patterns and refactors: Common mistakes and recommended fixes.

Quick Start

Analyze a composable screen for recomposition hotspots and apply the above patterns to improve frame stability and responsiveness.

Frequently Asked Questions about compose-performance

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

FAQPage Schema
How do I reduce Jetpack Compose recompositions in my Android app?

Reduce Jetpack Compose recompositions by enforcing stable state handling, using derivedStateOf to avoid triggering frequent recomposition, and offloading expensive computations to ViewModels away from composables.

What is the best way to optimize LazyColumn rendering in Jetpack Compose?

Optimize LazyColumn rendering in Jetpack Compose by using keys and contentType parameters. This enables efficient slot reuse, allowing the list to recycle components effectively and improve scrolling frame stability.

When should I use rememberSaveable instead of remember for Compose state?

Use rememberSaveable instead of remember when you need Compose state to survive configuration changes and process death. Remember is best suited for transient state that does not need to persist across these events.

Why does my Jetpack Compose LaunchedEffect run more than expected?

Your Jetpack Compose LaunchedEffect runs unexpectedly because of incorrect key usage. Apply proper keys to restart effects only when dependencies change, ensuring proper lifecycle management and avoiding redundant executions.

Are unstable Modifiers causing Jetpack Compose performance issues?

Unstable Modifiers cause Jetpack Compose performance issues by triggering per-composition allocations. Hoist stable modifiers to avoid unnecessary allocations and prevent recomposition hotspots during dynamic state management.

Can I use AnimatedVisibility to improve Compose animation performance?

Yes, prefer AnimatedVisibility for enter and exit animations in Jetpack Compose to improve performance. It reduces manual animation work and helps minimize expensive composition work during transitions.