testing-compose-in-release-mode

Measures Jetpack Compose performance against release builds with R8, Macrobenchmark, and release compiler reports.

Updated May 31, 2026
One-click install
npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill testing-compose-in-release-mode-decoutkhanqindev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-compose-in-release-mode
Source: https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat/tree/main/.claude/skills/testing-compose-in-release-mode
Command: npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill testing-compose-in-release-mode-decoutkhanqindev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debug builds misrepresent Jetpack Compose performance: the interpreted runtime, JIT warmup, Live Literals constant-getters, and approximate Layout Inspector counts inflate startup times, frame timings, and recomposition counts. This Skill ensures every performance number is measured against a release variant with R8 enabled so conclusions reflect what users actually experience. ## Core Features & Use Cases - Release-mode measurement setup: Configures a release (or release-derived) build with R8 minification, resource shrinking, debug signing for measurement, and NDK debug symbols for profiling. - Correct tooling wiring: Targets Macrobenchmark with CompilationMode.Partial(BaselineProfileMode.Require), reads Compose Compiler reports from the release output directory, and confirms recomposition counts with @TraceRecomposition instead of Layout Inspector. - Anti-pattern detection: Flags perf claims sourced from assembleDebug, CompilationMode.None, debug Layout Inspector counts, or numbers quoted without variant, device, and iteration provenance. - Use Case: A developer reports "startup is 1.4s" from a debug build. This Skill rebuilds the measurement against the release variant on a physical device and produces a reviewable number like "TimeToInitialDisplay p50 = 460 ms (release, R8 on, Pixel 6, cold start, 10 iterations)". ## Quick Start Ask the assistant to verify whether your Compose performance numbers were measured in release mode and to set up a release-with-R8 Macrobenchmark run for your app.

Frequently Asked Questions about testing-compose-in-release-mode

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

FAQPage Schema
Why are Jetpack Compose debug benchmarks slower than release?▼

Debug builds run the Compose runtime interpreted with JIT warmup, enable Live Literals that wrap constants in getters, and skip R8 optimizations like lambda grouping and sourceInformation stripping. Cited measurements show roughly 75 percent startup and 60 percent frame-render gains from debug to release.

How do I benchmark Compose startup with Macrobenchmark?▼

Target the release variant of the app under test and use CompilationMode.Partial(BaselineProfileMode.Require) with StartupTimingMetric, StartupMode.COLD, and about 10 iterations. Run on a physical device, since emulator numbers are not representative.

Are Layout Inspector recomposition counts accurate?▼

Layout Inspector counts are sampled, approximate, and debug-only, and Live Literals can inflate them. Confirm any recomposition claim with @TraceRecomposition from compose-stability-analyzer or Macrobenchmark FrameTimingMetric on a release build.

Should I read Compose Compiler reports from debug or release output?▼

Always read them from the release output directory, such as app_release-composables.txt. Debug reports are corrupted by Live Literals, which turns constants into getters and produces false-positive unstable parameters.

Can I profile a release build with Android Studio Profiler or simpleperf?▼

Yes, add ndk { debugSymbolLevel = "FULL" } to the release build type so native frames resolve in simpleperf and the Android Studio Profiler. Kotlin frames are recovered through the mapping.txt file that R8 produces when minification is enabled.

When is it acceptable to use debug builds for Compose testing?▼

Debug builds are fine for feature development and behavior or correctness testing where iteration speed matters. They are not acceptable for any performance claim, perf bug report, regression filing, or CI perf gate.