startup-jank-profiler

Diagnose Android startup latency and frame jank using Macrobenchmark, Baseline Profiles, and system traces.

Updated Jan 2, 2024
One-click install
npx skills add https://github.com/Mithrandir21/game-deals-app --skill startup-jank-profiler-mithrandir21
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: startup-jank-profiler
Source: https://github.com/Mithrandir21/game-deals-app/tree/main/.claude/skills/startup-jank-profiler
Command: npx skills add https://github.com/Mithrandir21/game-deals-app --skill startup-jank-profiler-mithrandir21

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android apps often suffer from slow cold starts and dropped frames during scrolling, but developers lack a structured process to measure, trace, and fix these performance issues on release builds. ## Core Features & Use Cases - Startup Measurement: Scaffolds Macrobenchmark tests with StartupTimingMetric to capture cold, warm, and hot start times on real devices. - Trace-Guided Diagnosis: Walks through System Trace analysis of Application.onCreate, content providers, and DI graph construction to find startup bottlenecks. - Fix Playbooks: Covers Baseline Profile generation, androidx.startup lazy initialization, Strong Skipping Mode, splash screen API usage, and lazy-list key fixes for jank. - Use Case: Your app's cold start regressed after adding a new SDK. Use this Skill to benchmark the baseline, trace which content provider blocks first frame, defer it, and verify the improvement with a post-fix benchmark. ## Quick Start Ask the assistant to profile your app's cold startup time and identify what is blocking the first frame.

Frequently Asked Questions about startup-jank-profiler

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

FAQPage Schema
How do I measure Android cold startup time?▼

Measure cold startup with a Macrobenchmark test using StartupTimingMetric and StartupMode.COLD, running 5-10 iterations on a real device. Always benchmark the release build with R8 enabled, since debug builds are not representative of production performance.

What is a Baseline Profile and how does it improve startup?▼

A Baseline Profile is a generated list of classes and methods the ART runtime pre-compiles, typically improving cold start by 15-30%. Add the androidx.baselineprofile plugin, write a generator test that exercises startup and key user paths, and ship the profile with the app.

Why is my LazyColumn dropping frames when scrolling?▼

LazyColumn jank usually comes from missing item keys, causing every item to recompose on data change. Add items(list, key = { it.id }), move image decoding to Coil or Glide, and avoid heavy synchronous parsing during scroll.

Should I profile startup on debug or release builds?▼

Always profile release builds, because R8 minification and resource shrinking significantly change startup behavior. Use a profileable manifest entry if you need tracing on a non-debuggable build.

When should I not defer initialization to a background thread?▼

Do not move work to a background thread if it must complete before the first frame renders, since that creates a race condition rather than a fix. Only defer SDKs and services that the first screen does not need, using androidx.startup or Dispatchers.Default.