compose-recomposition-performance

Diagnoses Jetpack Compose recomposition causes and routes fixes to focused stability, deferred-read, and side-effect skills.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/w0lzard/Wolzard-s-Marketplace --skill compose-recomposition-performance-w0lzard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-recomposition-performance
Source: https://github.com/w0lzard/Wolzard-s-Marketplace/tree/main/plugins/personal-skills/skills/compose-recomposition-performance
Command: npx skills add https://github.com/w0lzard/Wolzard-s-Marketplace --skill compose-recomposition-performance-w0lzard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Jetpack Compose UIs can recompose far more often than necessary, causing jank and wasted frames, but the root cause is rarely obvious. This Skill triages recomposition regressions by separating three distinct causes—parameter stability, where State is read, and cross-phase back-writing—so you stop applying fixes that do not reduce recomposition counts. ## Core Features & Use Cases - Three-axis diagnosis: Classifies issues into parameter stability/skipping, frame-rate State read phase (composition vs layout/draw), and back-writing snapshot state across phases. - Routing to focused skills: Directs each suspected cause to the right deep-dive skill (compose-stability-diagnostics, compose-state-deferred-reads, compose-side-effects) instead of guessing. - False-lead detection: Lists common fixes that do not reduce recomposition, such as remember-wrapping unchanged inputs or hoisting without stabilizing lambda captures. - Use Case: After a focus move in a lazy list causes every visible row to recompose, use this Skill to determine whether the cause is cross-row measurement back-writing before blaming parameter stability. ## Quick Start Ask the assistant to investigate why your Compose screen recomposes excessively during scrolling or focus changes and have it classify the cause using the three recomposition axes.

Frequently Asked Questions about compose-recomposition-performance

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

FAQPage Schema
How do I find why my Jetpack Compose composable recomposes too often?

Reproduce one transition such as a focus move, insertion, or scroll and note which composables recompose. Then classify the cause along three axes: parameter stability, where State is read, and back-writing across phases, before applying any fix.

What is the difference between skippable and restartable composables in Compose?

A restartable composable can be re-executed by Compose, while a skippable one can be skipped when its inputs are unchanged and stable. Skipping fails when parameters are unstable or lambda captures create new instances each frame.

Why does reading State in composition cause more recompositions than reading in layout?

State read during composition invalidates the whole composition scope when it changes, re-running the composable. Reading the same State in layout or draw phases confines invalidation to that cheaper phase, avoiding full recomposition.

Why does mutating a map during composition cause recomposition loops?

Mutating snapshot state such as a map during composition is a back-write that re-invalidates the same composition currently running. This cross-phase write triggers additional recomposition passes instead of letting the frame settle.

When should I not try to reduce recomposition counts?

Do not optimize when recomposition tracks real data changes or when the bug is correctness rather than cost. Also skip optimization when no profiler or compiler report signal indicates an actual performance problem.