performance-profiling

Diagnose performance bottlenecks in Apple platform apps using Instruments and MetricKit.

27|5|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/bocan/bocan-music --skill performance-profiling-bocan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-profiling
Source: https://github.com/bocan/bocan-music/tree/main/.claude/skills/performance/profiling
Command: npx skills add https://github.com/bocan/bocan-music --skill performance-profiling-bocan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates guesswork when troubleshooting performance issues in Apple platform apps, addressing hangs, memory bloat, slow launches, and excessive battery drain that degrade user experience and risk App Store rejection.

Core Features & Use Cases

  • Multi-domain profiling guidance: Step-by-step workflows for CPU, memory, launch time, and energy analysis using Instruments, Xcode diagnostics, and MetricKit.
  • Actionable fix patterns: Code examples and best practices for common issues like main thread blocking, retain cycles, and inefficient background tasks.
  • Production monitoring support: Integration with MetricKit to track real-user performance metrics and catch regressions post-launch.
  • Use Case: For a macOS music app with slow cold launch times, use this Skill to identify excessive dynamic framework loading, defer non-essential initialization, and cut launch time to meet the 400ms target.

Quick Start

Use the performance-profiling skill to investigate the slow launch and frequent main thread hangs reported by beta users of your SwiftUI macOS music app.

Frequently Asked Questions about performance-profiling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix main thread hangs and slow launch times in a SwiftUI macOS app?

Resolve main thread hangs and slow launch times by profiling with Instruments to identify blocking tasks, deferring non-essential initialization, and reducing dynamic framework loading to meet App Store launch targets.

What's the best way to diagnose memory leaks and retain cycles on Apple platforms?

Diagnose memory leaks and retain cycles on Apple platforms by running Xcode memory diagnostics and Instruments to trace object retention, applying actionable fix patterns to break strong reference cycles.

How does MetricKit monitor production performance regressions for iOS and macOS apps?

MetricKit monitors production performance by collecting real-user metrics for hangs, memory bloat, and energy consumption, allowing you to catch regressions post-launch without manual Instruments profiling.

Can I use os_signpost instrumentation to measure custom performance bottlenecks in Xcode?

Yes, you can use os_signpost to instrument custom code intervals, enabling Instruments to visualize specific subsystem performance and pinpoint bottlenecks within your Apple platform application workflow.

Why does my Apple app get rejected for excessive energy consumption during App Store review?

Apple app rejections for excessive energy consumption occur when background tasks drain battery; energy diagnostics identify inefficient operations, allowing you to apply fix patterns and pass App Store requirements.

Does this performance profiling workflow support watchOS and tvOS development?

Yes, the performance profiling workflow supports watchOS and tvOS development alongside iOS and macOS, providing step-by-step guidance for CPU, memory, launch time, and energy analysis across all Apple platforms.