원클릭으로
performance-profiling
Performance profiling principles. Measurement, analysis, and optimization techniques.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Performance profiling principles. Measurement, analysis, and optimization techniques.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Rules and standards for building and scaffolding Flutter applications for AI-assisted development.
This skill is specialized in Flutter mobile application architecture, based on Clean Architecture, strict layer separation, low coupling, and high testability. Its purpose is to guide architectural decisions and validate architectural compliance across the codebase.
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
Socratic questioning protocol + user communication. MANDATORY for complex requests, new features, or unclear requirements. Includes progress reporting and error handling.
Clean Code rules and standards for Dart and Flutter applications.
Documentation templates and structure guidelines. README, API docs, code comments, and AI-friendly documentation.
| name | performance-profiling |
| description | Performance profiling principles. Measurement, analysis, and optimization techniques. |
| allowed-tools | Read, Glob, Grep, Bash |
Measure, analyze, optimize - in that order.
Execute these for automated profiling:
| Script | Purpose | Usage |
|---|---|---|
scripts/analyze_size.sh | Analyze app bundle size | flutter build apk --analyze-size |
| Metric | Good | Poor | Context |
|---|---|---|---|
| UI Thread | < 16ms | > 16ms | Dartmouth execution & Widget building |
| Raster Thread | < 16ms | > 16ms | GPS/Skia rendering commands |
| FPS | 60/120 | < 55 | Smoothness |
| Jank | 0 frames | > 0 | Dropped frames |
| Stage | Tool |
|---|---|
| Development | DevTools (Performance View) |
| Profiling | Profile Mode (flutter run --profile) |
| Production | Firebase Performance Monitoring |
1. BASELINE → Measure current state
2. IDENTIFY → Find the bottleneck
3. FIX → Make targeted change
4. VALIDATE → Confirm improvement
| Problem | Tool |
|---|---|
| App Size | flutter build --analyze-size |
| UI Jank | DevTools Performance |
| CPU usage | DevTools CPU Profiler |
| Memory leaks | DevTools Memory |
| Network lag | DevTools Network |
🔴 NEVER profile in DEBUG mode. Performance metrics are meaningless in debug mode (JIT enabled, assertions on). ✅ ALWAYS use PROFILE mode:
flutter run --profile
| Issue | Indicator |
|---|---|
| Large Assets | Top of size report |
| Unused Packages | Found in pubspec.yaml |
| Large Dependencies | flutter pub run dart_code_metrics:metrics |
| Native Bloat | build/app/outputs/size-report.json |
| Finding | Action |
|---|---|
| Large images | Compress or use WebP |
| Heavy package | Find lighter alternative |
| Debug code in release | Use kReleaseMode |
| Duplicate code | Refactor into common widgets |
| Symptom | Likely Cause |
|---|---|
| High Frame Time | Heavy build method |
| High Raster Time | Expensive graphics (Shadows/Clips) |
| App Size Bloat | Unoptimized assets |
| Growing memory | Leaks (leaked listeners) |
| Symptom | Likely Cause | Fix |
|---|---|---|
| Jank on first run | Shader Compilation | Impeller (Standard on iOS/Android now) |
| Jank on scroll | Expensive build() | const widgets, extract widgets |
| High CPU | Layout Thrashing | Avoid IntrinsicHeight, ShrinkWrap |
| Image stutter | Main thread decoding | Cache images, resize in worker |
| Memory Spike | Large images | cacheWidth/cacheHeight in NetworkImage |
| Priority | Action | Impact |
|---|---|---|
| 1 | Enable Impeller | High |
| 2 | Use const widgets | High |
| 3 | Optimize Images | Medium |
| 4 | Shrink Unused Assets | Medium |
| 5 | Lazy build Lists | Medium |
| ❌ Don't | ✅ Do |
|---|---|
| Guess at problems | Profile first |
| Micro-optimize | Fix biggest issue |
| Optimize early | Optimize when needed |
| Ignore real users | Use RUM data |
Remember: The fastest code is code that doesn't run. Remove before optimizing.