performance
/performance
Find and fix Flutter performance problems - janky scrolling, slow startup, excessive rebuilds, memory growth, battery drain from idle animations, and large app size. Use when the user reports lag, dropped frames, slow screens, high memory or battery use, or asks for a performance review.
- Author
- ChandraChaan ↗
- Repository
- flutter-agent-skills ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Find and fix Flutter performance problems - janky scrolling, slow startup, excessive rebuilds, memory growth, battery drain from idle animations, and large app size. Use when the user reports lag, dropped frames, slow screens, high memory or battery use, or asks for a performance review.
Original author description
Find and fix Flutter performance problems - janky scrolling, slow startup, excessive rebuilds, memory growth, battery drain from idle animations, and large app size. Use when the user reports lag, dropped frames, slow screens, high memory or battery use, or asks for a performance review.
How it works
- 1. Reproduce in profile mode
- 2. Common causes and fixes
- 3. Report
SKILL.md preview
--- name: performance description: Find and fix Flutter performance problems - janky scrolling, slow startup, excessive rebuilds, memory growth, battery drain from idle animations, and large app size. Use when the user reports lag, dropped frames, slow screens, high memory or battery use, or asks for a performance review. --- # Flutter performance audit Measure first, change one thing at a time, measure again. Never judge performance in debug mode. ## 1. Reproduce in profile mode ```bash flutter run --profile # on a real, preferably low-end, device ``` Open DevTools (the URL is printed) and use: - **Performance:** frame chart. Red bars are frames over budget (16 ms at 60 Hz, 8 ms at 120 Hz). Check whether the **UI** thread (your Dart code: build, layout) or the **raster** thread (painting, shaders, layers) is slow. - **CPU profiler:** record while reproducing; sort by self time. - **Memory:** take snapshots before and after repeating an action; growth that never comes back is a leak. - **Rebuild stats** (Flutter Inspector): which widgets rebuild on each frame. On the web, use the browser's Performance panel as well. ## 2. Common causes and fixes ### UI thread slow (build/layout) | Symptom | Fix | |---|---| | Whole screen rebuilds on every change | Split into smaller widgets; `ref.watch(provider.select((s) => s.field))`; move state down | | Missing `const` | Add `const` constructors and call sites | | Work in `build` (sorting, parsing, formatting) | Compute once in the controller or memoise | | Big JSON or image processing | `Isolate.run` / `compute` | | `ListView(children: [...])` with many items | `ListView.builder` / slivers; set `itemExtent` or `prototypeItem` for fixed heights | | `IntrinsicHeight`, `IntrinsicWidth`, nested `shrinkWrap` lists | Restructure the layout; they force extra layout passes | ### Raster thread slow (painting) | Symptom | Fix | |---|---| | `Opacity` / `ShaderMask` / `ClipPath` on animated content | `FadeTransition`, `AnimatedOpacity`, colour alpha, `ClipRRect` with simpler shapes | | Large `BackdropFilter` blurs | Smaller area, or a static blurred image | | A complex static subtree repainting with a small animation | Wrap the animated part (or the static part) in `RepaintBoundary` | | Huge images decoded at full size | `cacheWidth` / `cacheHeight` matching display size × device pixel ratio | ### Idle cost and battery - An animation that loops forever (`repeat()`, an animated placeholder, a Lottie or Rive loop) redraws **every frame even when nothing changes**. Stop it after a few repeats, when off screen (`VisibilityDetector` or `TickerMode`), or when the app is paused. - Check: with the app idle, the DevTools frame chart should go quiet. If frames keep coming, find the ticker. - Timers and stream subscriptions not cancelled in `dispose` keep work running. ### Startup - Measure: `flutter run --profile --trace-startup` (writes `build/start_up_info.json`). - Defer non-essential initialisation (analytics, remote config fetch, large caches) until after the first frame. - Keep `main()` and the first screen's dependencies small; lazy-load heavy features with deferred imports on the web. ### App size ```bash flutter build apk --analyze-size --target-platform android-arm64 flutter build ios --analyze-size ``` Look for large assets (compress images, use WebP, subset fonts), unused packages, and debug-only dependencies leaking into release. ## 3. Report For each change: the symptom, the measured before/after (frame times, memory, size), and the code change. If something couldn't be measured (no device), say so rather than guessing.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · ChandraChaan/flutter-agent-skills | 100 | MIT |
| ericrisco/rsc-harness | 100 | MIT |
| yonatangross/orchestkit | 100 | MIT |
| yonatangross/orchestkit | 100 | MIT |
| davila7/claude-code-templates | 100 | MIT |
| motormetrics/motormetrics | 100 | MIT |
| motormetrics/motormetrics | 100 | MIT |
| event4u-app/agent-config | 100 | MIT |
| arxdsilva/ai-loops | 100 | MIT |
Database snapshot: 13.11.2026 · package version 7d1c81edb365 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100swiftui-performance-audit
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments… - 100flutter-performance
Profile and improve Flutter runtime performance using profile-mode evidence, DevTools, frame analysis, rebuild inspection, memory, and app-size tools. Use for jank, slow startup, excessive work, leaks, or size regressions; route production logs, errors, and traces to flutter-observability. - 100guide-swiftui-performance-audit
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments… - 90flutter-performance
Flutter performance and app-size optimization (Flutter 3.47 official perf docs + LeanCode) - jank and dropped frames, excessive rebuilds, heavy build() work, isolates/compute, long lists (ListView.builder, GridView.builder, slivers, shrinkWrap), image memory (cacheWidth),… - 100mobile-performance
Diagnoses and prevents mobile performance regressions on every stack — Flutter, native Android, native iOS, React Native and Kotlin Multiplatform. Covers startup time, rendering and jank, memory, battery and background work, app size, the profiler and benchmark to use on each… - 90mobile-performance
Use this skill when the user asks about mobile performance optimization, app slow, jank, frame drops, memory leaks, startup time, battery drain, bundle size, or profiling tools.