generating-baseline-profiles

Generate and validate Jetpack Compose baseline profiles with Macrobenchmark.

472|16|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/skydoves/compose-performance-skills --skill generating-baseline-profiles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generating-baseline-profiles
Source: https://github.com/skydoves/compose-performance-skills/tree/main/measurement/generating-baseline-profiles
Command: npx skills add https://github.com/skydoves/compose-performance-skills --skill generating-baseline-profiles

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Baseline performance profiling for Jetpack Compose apps by generating and validating AOT baseline profiles to improve cold startup and first-scroll smoothness.

Core Features & Use Cases

  • End-to-end Baseline Profiles: Generate and verify baseline profiles using BaselineProfileRule and Macrobenchmark.
  • Release-ready Measurement: Measure with Macrobenchmark using CompilationMode.Partial(BaselineProfileMode.Require) against a real device.
  • APK Validation: Confirm assets/dexopt/baseline.prof and baseline.profm are shipped in the APK and wiring is present in app module.

Quick Start

Run the Gradle task to generate the baseline profile and execute the Macrobenchmark suite to verify improvements.

Frequently Asked Questions about generating-baseline-profiles

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

FAQPage Schema
How do I generate baseline profiles for Jetpack Compose to improve cold startup?

Generate baseline profiles for Jetpack Compose using the AGP 8.2+ Baseline Profile Generator and Macrobenchmark harness to enable ahead-of-time compilation. This measures cold startup and first-scroll performance on real devices, ensuring faster startup.

What is CompilationMode Partial BaselineProfileMode Require for macrobenchmarks?

CompilationMode Partial(BaselineProfileMode.Require) enforces the use of baseline profiles during macrobenchmark measurement. It ensures the profile is actively applied and validates that startup improvements are strictly derived from the generated baseline profile.

Does generating baseline profiles require release builds on real devices?

Yes, generating and validating baseline profiles requires running release builds on real physical devices. The Macrobenchmark harness measures actual cold startup and first-scroll performance, which cannot be accurately captured on emulators or debug builds.

How to validate that dexopt baseline.prof and baseline.profm are shipped in the APK?

Validate baseline profiles by confirming the assets/dexopt/baseline.prof and baseline.profm files are correctly packaged inside the APK. Additionally, verify the necessary profile wiring is present within the app module to enable ahead-of-time compilation.

How do I measure first-scroll smoothness using macrobenchmark with baseline profiles?

Measure first-scroll smoothness using the Macrobenchmark harness configured with BaselineProfileRule. The system reports medians across multiple iterations, validating that the baseline profile effectively enhances Compose scrolling performance.

Why does my Compose app startup not improve after adding a baseline profile?

Startup may not improve if the baseline profile is not properly shipped in the APK or if measurement does not enforce CompilationMode Partial(BaselineProfileMode.Require). Ensure the profile wiring is present in the app module and tested on release builds.