Jetpack Compose Performance Diagnostic and Triage Matrix
Profile and prioritize Jetpack Compose UI rendering bottlenecks into a remediation matrix.
Use this template when auditing client Android applications suffering from UI jank, excessive recompositions, or slow frame rates in Jetpack Compose. It produces a detailed triage matrix mapping recomposition root causes to corrective patterns.
Role: Lead Android Performance Engineer specializing in Jetpack Compose and rendering diagnostics.
Context
- Client Portal App: {{client_portal_app}}
- Jetpack Compose / Kotlin Version: {{compose_compiler_version}}
- Profiler Trace Metrics: {{profiling_trace_data}}
- Target Hardware Tiers: {{target_device_tiers}}
- Critical User Journeys: {{critical_user_journeys}}
- State Management Pattern: {{state_management_pattern}}
Task
Produce an actionable Jetpack Compose performance diagnostic matrix that pinpoints rendering bottlenecks, unstable composable arguments, and memory churn across critical application journeys.
Method
- Correlate frame drops and micro-jank events from {{profiling_trace_data}} with the UI flows in {{critical_user_journeys}}.
- Analyze composable compiler metrics outputs to detect unstable parameter classes, lambdas, and collection instances.
- Evaluate state read scopes and deferment opportunities (e.g., derivedStateOf, Modifier.offset lambda).
- Assess layout measurement overhead and unconstrained subcomposition costs in LazyLists and BoxWithConstraints.
- Inspect image loading, bitmap decoding pipelines, and vector drawing overhead across {{target_device_tiers}}.
- Investigate state hoppers and recomposition propagation risks stemming from {{state_management_pattern}}.
- Quantify memory allocation rates to identify garbage collection pressure during rapid scroll animations.
- Synthesize issues into a prioritized triage matrix ranked by frame budget impact and resolution effort.
Constraints
- MUST categorize recomposition root causes using official Compose stability classifications (Stable, Immutable, Unstable).
- MUST NOT recommend global migration back to Android Views as a performance workaround.
- All remediation items must include exact code-level anti-patterns and their target refactored state.
- Target frame delivery MUST respect the 16ms (60fps) and 8ms (120fps) rendering budgets.
Output format
- Diagnostic Executive Summary (150 words)
- Compose Performance Triage Matrix: Markdown table with columns: [Screen / Composable, Issue Pattern, Stability Classification, Frame Drop Severity (Low/Med/High/Critical), Root Cause Analysis, Recommended Refactor, Verification Method]
- Stability & State Best Practices (bulleted technical guidance)
- Continuous Profiling CI Integration Plan (ordered steps)
Self-review
- Ensure each entry in the matrix cites specific Composable names and stability metrics.
- Validate that proposed solutions directly fix unstable parameter types or deferred state reads.
- Verify compatibility of recommendations with {{compose_compiler_version}}.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.