Diagnose and improve my mobile app's performance
A performance review of an iOS or Android app covering startup time, jank, memory, battery, network, and crashes, with tools and a fix plan.
The prompt
Help me find and fix performance problems in my mobile app.
Platform and stack: [iOS (Swift/SwiftUI) / Android (Kotlin/Compose) / React Native / Flutter]
The problem: [e.g. "slow cold start", "scrolling stutters on long lists", "app killed in background", "battery complaints"]
Metrics or evidence I have: [e.g. "Android vitals ANR rate 0.6%", "cold start 4s on mid-range devices", crash reports, user reviews]
Devices affected: [e.g. "older Android phones", "all iPhones"]
Relevant code or traces: [PASTE code, profiler output, or logs]
Give me:
1. The key metrics for my problem and reasonable targets: cold and warm start time, frame rendering (dropped or slow frames), ANR rate, crash-free sessions, memory use, app size, network payload, and battery impact.
2. The tools to measure each on my platform (e.g. Xcode Instruments, MetricKit, Android Studio Profiler, Macrobenchmark, Perfetto, Firebase Performance, Flutter DevTools), and how to capture a useful trace.
3. Likely causes ranked by probability given my evidence, such as work on the main thread, heavy startup initialization, unoptimized images, over-rendering lists, memory leaks, chatty network calls, or bridge overhead in cross-platform apps.
4. If I shared code or traces: specific issues and the fix for each, with code changes.
5. A test plan: which devices and network conditions to test on, and how to check the fix worked without regressions.
6. Ongoing monitoring: what to track in production and alert thresholds.
Don't guess at numbers from my traces; if something is unclear, tell me what to measure next.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Software Development prompts
What to fill in
- e.g. "older Android phones", "all iPhones"
- PASTE code, profiler output, or logs
How this prompt is built
This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.
Related prompts
- Write and explain a regular expressionBuilds a regex from a description, explains it piece by piece, and tests it.
- Write precise TypeScript types for my data and APIsSafer, readable TypeScript types that rule out impossible states, replace unsafe casts, and come with compile-time tests.
- Write a style guide that documents my app's existing design codeReverse-engineers colors, typography, spacing, and component patterns from your codebase into a STYLE_GUIDE.md developers and AI agents can follow.
- Write a Semgrep rule to catch a risky code patternProduces a working Semgrep rule with test cases, so you can block a bug or security pattern across your codebase.