axiom-performance-profiling
БесплатноБез исполняемых скриптовНе проверенUse when app feels slow, memory grows over time, battery drains fast, or you want to profile proactively - decision trees to choose the right Instruments…
от ComeOnOliver★ 67 звёзд на GitHubОб этом скилле
Performance Profiling
Overview
iOS app performance problems fall into distinct categories, each with a specific diagnosis tool. This skill helps you choose the right tool, use it effectively, and interpret results correctly under pressure.
Core principle: Measure before optimizing. Guessing about performance wastes more time than profiling.
Requires: Xcode 15+, iOS 14+
Related skills: axiom-swiftui-performance (SwiftUI-specific profiling with Instruments 26), axiom-memory-debugging (memory leak diagnosis)
When to Use Performance Profiling
Use this skill when
- ✅ App feels slow (UI lags, loads take 5+ seconds)
- ✅ Memory grows over time (Xcode shows increasing memory usage)
- ✅ Battery drains fast (device gets hot, battery depletes in hours)
- ✅ You want to profile proactively (before users complain)
- ✅ You're unsure which Instruments tool to use
- ✅ Profiling results are confusing or contradictory
Use axiom-memory-debugging instead when
- Investigating specific memory leaks with retain cycles
- Using Instruments Allocations in detail mode
Use axiom-swiftui-performance instead when
- Analyzing SwiftUI view body updates
- Using SwiftUI Instrument specifically
Performance Decision Tree
Before opening Instruments, narrow down what you're actually investigating.
Step 1: What's the Symptom?
App performance problem?
├─ App feels slow or lags (UI interactions stall, scrolling stutters)
│ └─ → Use Time Profiler (measure CPU usage)
├─ Memory grows over time (Xcode shows increasing memory)
│ └─ → Use Allocations (measure object creation)
├─ Data loading is slow (parsing, database queries, API calls)
│ └─ → Use Core Data instrument (if using Core Data)
│ └─ → Use Time Profiler (if it's computation)
└─ Battery drains fast (device gets hot, depletes in hours)
└─ → Use Energy Impact (measure power consumption)
Step 2: Can You Reproduce It?
YES – Use Instruments to measure it (profiling is most accurate)
NO – Use profiling proactively
- Enable Core Data SQL debugging to catch N+1 queries
- Profile app during normal use (scrolling, loading, navigation)
- Establish baseline metrics before changes
Step 3: Which Instruments Tool?
Time Profiler – Slowness, UI lag, CPU spikes Allocations – Memory growth, memory pressure, object counts Core Data – Query performance, fetch times, fault fires Energy Impact – Battery drain, sustained power draw Network Link Conditioner – Connection-related slowness System Trace – Thread blocking, main thread blocking, scheduling
Time Profiler Deep Dive
Use Time Profiler when your app feels slow or laggy. It measures CPU time spent in each function.
Workflow: Record and Analyze
Step 1: Launch Instruments
open -a Instruments
Select "Time Profiler" template.
Step 2: Attach to Running App
- Start your app in simulator or device
- In Instruments, select your app from the target dropdown
- Click Record (red circle)
- Interact with the slow part (scroll, tap buttons, load data)
- Stop recording after 10-30 seconds of interaction
Step 3: Read the Call Stack
The top panel shows a timeline of CPU usage over time. Look for:
- Tall spikes – Brief CPU-intensive operations
- Sustained high usage – Continuous expensive work
- Main thread blocking – UI thread doing work (causes UI lag)
Step 4: Drill Down to Hot Spots
In the call tree, click "Heaviest Stack Trace" to see which functions use the most CPU:
Time Profiler Results
MyViewController.viewDidLoad() – 500ms (40% of total)
├─ DataParser.parse() – 350ms
│ └─ JSONDecoder.decode() – 320ms
└─ UITableView.reloadData() – 150ms
Self Time = Time spent IN that function (not in functions it calls) Total Time = Time spent in that function + everything it calls
Common Mistakes & Fixes
❌ Mistake 1: Blaming the Wrong Function
// ❌ WRONG: Profile shows DataParser.parse() is 80% CPU
// Conclusion: "DataParser is slow, let me optimize it"
// ✅ RIGHT: Check what DataParser is calling
// If JSONDecoder.decode() is doing 99% of the work,
// optimize JSON decoding, not DataParser
The issue: A function with high Total Time might be calling slow code, not doing slow work itself.
Fix: Look at Self Time, not Total Time. Drill down to see what each function calls.
❌ Mistake 2: Profiling the Wrong Code Path
// ❌ WRONG: Profile app in Simulator
// Simulator CPU is different than real device
// Results don't reflect actual device performance
// ✅ RIGHT: Profile on actual device
// Device settings: Developer Mode enabled, Xcode attached
Fix: Always profile on actual device for accurate CPU measurements.
❌ Mistake 3: Not Isolating the Problem
// ❌ WRONG: Profile entire app startup
// Sees 2000ms startup time, many functions involved
// ✅ RIGHT: Profile just the slow part
// "App feels
Установить axiom-performance-profiling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл axiom-performance-profiling?
Use when app feels slow, memory grows over time, battery drains fast, or you want to profile proactively - decision trees to choose the right Instruments tool, deep workflows for Time Profiler/Allocations/Core Data, and pressure scenarios for misinterpreting results
Как установить скилл axiom-performance-profiling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл axiom-performance-profiling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic