ios-performance

Diagnose iOS performance issues using Instruments, xctrace, and MetricKit.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/Emasoft/emasoft-complete-ios-app-authoring --skill ios-performance-emasoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-performance
Source: https://github.com/Emasoft/emasoft-complete-ios-app-authoring/tree/main/skills/ios-performance
Command: npx skills add https://github.com/Emasoft/emasoft-complete-ios-app-authoring --skill ios-performance-emasoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the guesswork in iOS performance optimization by providing a systematic, evidence-based workflow for diagnosing slow launches, UI jank, main-thread hangs, memory leaks, battery drain, slow Xcode builds, and oversized app binaries.

Core Features & Use Cases

  • Profiling workflows: Route symptoms to the correct Instruments template (Time Profiler, Allocations, System Trace, Energy Log) and CLI tools like xctrace and sample.
  • Memory & leak diagnosis: Identify the 6 common leak patterns (timers, observers, closures, retain cycles, view callbacks, PhotoKit requests) using Memory Graph Debugger and the CLI memory toolkit.
  • SwiftUI & Swift optimization: Tune SwiftUI body re-evaluation with the @Observable macro, lazy containers, and stable identity; optimize Swift 6.2 code with InlineArray, Span, and copy-on-write best practices.
  • App launch & build tuning: Reduce cold launch time below 400 ms by optimizing dyld pre-main, deferring SDK initialization, and fixing Xcode build settings for faster incremental builds.
  • Binary size reduction: Apply a tiered catalogue of P1–P20 techniques with validation gates to shrink download size without sacrificing quality or security.

Quick Start

Profile your app's slow launch on a real device using the App Launch template in Instruments to identify the dominant startup phase and apply the targeted fixes from this skill.

Frequently Asked Questions about ios-performance

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

FAQPage Schema
How do I diagnose slow app launch times in iOS?

Diagnose slow app launch times by profiling with the App Launch template in Instruments on a real device to identify the dominant startup phase, then optimize dyld pre-main execution and defer SDK initialization to reduce cold launch below 400 ms.

What's the best way to find memory leaks in Swift using Instruments?

Find memory leaks in Swift by using the Memory Graph Debugger and CLI memory toolkit to identify six common leak patterns including timers, observers, closures, retain cycles, view callbacks, and PhotoKit requests.

How do I fix UI jank and main-thread hangs in SwiftUI?

Fix UI jank and main-thread hangs in SwiftUI by tuning body re-evaluation with the @Observable macro, lazy containers, and stable identity, while validating frame pacing improvements through XCTest performance baselines.

Can I reduce my iOS app binary size without sacrificing quality?

Reduce your iOS app binary size by applying a tiered catalogue of P1–P20 techniques with validation gates to shrink download size without sacrificing quality or security.

Does iOS performance profiling require testing on real devices?

iOS performance profiling requires measurement on real devices with Release builds to accurately capture data using Time Profiler, Allocations, System Trace, and Energy Log instruments.

How do I monitor battery drain in production iOS apps?

Monitor battery drain in production iOS apps by routing symptoms to the Energy Log instrument and validating fixes through MetricKit field diagnostics.