flutter-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), Opacity/saveLayer/clipping, intrinsics, Impeller, RepaintBoundary, CustomPaint shouldRepaint, Flutter Web rebuilds, APK/IPA size analysis. Use this whenever the user reports laggy scrolling, stutter, freezes, high memory/OOM, slow startup, a big app binary, or asks to optimize or review a Flutter screen/list for performance.
原文 · 译文尚未补齐适用对象:移动应用开发。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Flutter performance
- Measure first
- Rebuilds
- CPU work → isolates
- Lists and grids
- Images (most common OOM cause)
- Painting and animation
- App size
Verified 2026-09-25 against docs.flutter.dev/perf (Flutter 3.47: Impeller is the default renderer on iOS, Android API 29+, macOS, Windows and Linux; not web). A frame has 16 ms at 60 Hz (8 ms at 120 Hz). Almost every real Flutter performance problem is self-inflicted: too-wide rebuilds, work in build(), eager lists, full-resolution images, or CPU work on the UI isolate. The engine (Impeller) is rarely the bottleneck. Profile in profile mode on a real (ideally low-end) device. Debug-mode numbers are meaningless. Use DevTools Performance and the Timeline (frame times, jank), the Performance Overlay, and Memory (leaks, image cache). Optimize when you see dropped frames, stuttering animations, or laggy scrolling. Otherwise write clear code first. No premature optimization. Call setState as low in the tree as possible. State high up rebuilds everything below it. Split big widgets into small widget classes (not helper methods, which rebuild with the parent). Use const constructors wherever possible; const widgets are skipped on rebuild. Nothing expensive in build() (parsing, sorting, filtering, formatting big data). Do it in initState/didUpdateWidget (recompute only when input changed) o
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- abugeek/flutter-skills
- 源文件
- .claude/skills/flutter-performance/SKILL.md
- 固定版本
- 458377635834ad1cff2c4871ac0725a5ef4bcd4f
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:abugeek/flutter-skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-10T09:01:53.919Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。