본문으로 건너뛰기
Skillpedia
모바일 앱7.2k · #13340

performance-profiling

하는 일

이 스킬은 아이폰, 아이패드, 맥 앱의 성능 문제를 진단하는 과정을 에이전트가 따라가도록 안내합니다. 멈춤, 메모리 증가, 느린 실행, 배터리 소모의 원인을 찾아야 하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓아이폰, 아이패드 또는 맥 앱이 멈추거나 끊길 때.
  • ✓메모리가 계속 늘어나거나 메모리 부족으로 앱이 종료되는 경우.
  • ✓앱 실행이 느리거나 배터리가 빨리 닳는 경우.

스킬 링크

https://github.com/MengTo/Skills/blob/main/agent-skills/codex/performance-profiling/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/MengTo/Skills/blob/main/agent-skills/codex/performance-profiling/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“아이폰 앱에서 메뉴를 열 때 1초 정도 멈춥니다. 원인을 찾고 해결 방법을 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 문제에 맞는 측정 방법을 고르고, 측정 결과를 읽은 뒤 필요한 부분만 고칩니다. 그다음 실제 측정으로 변경 사항이 효과가 있었는지 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Performance Profiling

Use this skill to diagnose Apple app performance issues systematically, pick the right profiling workflow, apply targeted fixes, and verify the change with real measurements.

Decision Tree

Choose the reference file before changing code:

What performance problem are you investigating?

+ App hangs, stutters, dropped frames, slow UI, high CPU
  -> Read references/time-profiler.md

+ High memory, leaks, OOM crashes, growing footprint
  -> Read references/memory-profiling.md

+ Slow cold launch, warm launch, resume, or time to first frame
  -> Read references/launch-optimization.md

+ Battery drain, thermal throttling, background energy, network waste
  -> Read references/energy-diagnostics.md

+ General "app feels slow"
  -> Start with references/time-profiler.md, then references/memory-profiling.md

+ Pre-release performance audit
  -> Read all reference files and use the review checklist below

Quick Reference

Problem Instrument / Tool Key Metric Reference
UI hangs over 250 ms Time Profiler + Hangs Hang duration, main thread stack references/time-profiler.md
High CPU usage Time Profiler CPU percent by function, call tree weight references/time-profiler.md
Memory leak Leaks + Memory Graph Leaked bytes, retain cycle paths references/memory-profiling.md
Memory growth Allocations Live bytes, generation analysis references/memory-profiling.md
Slow launch App Launch Time to first frame, pre-main, post-main references/launch-optimization.md
Battery drain Energy Log Energy impact, CPU/GPU/network activity references/energy-diagnostics.md
Thermal issues Activity Monitor, Instruments Thermal state transitions references/energy-diagnostics.md
Network waste Network profiler Redundant fetches, payload size references/energy-diagnostics.md

Workflow

  1. Identify the performance category from the user report, traces, logs, or code path.
  2. Read only the matching reference file unless the issue is broad or unclear.
  3. Prefer real device profiling with a Release build and representative data.
  4. Inspect the code path named by the profile before proposing a fix.
  5. Apply the smallest targeted fix that addresses the measured bottleneck.
  6. Re-profile or add a repeatable measurement to confirm the improvement.

Profiling Ground Rules

  • Profile on device when possible; Simulator uses host CPU and memory.
  • Use Release configuration because optimizations can change hot paths.
  • Reproduce with representative data, not empty databases or toy assets.
  • Close unrelated apps to reduce noise during profiling.
  • Keep measurements before and after the fix so the outcome is concrete.
  • Add os_signpost markers when a workflow needs ongoing timing visibility.

Xcode Diagnostics

Recommend relevant Scheme > Run > Diagnostics settings when they match the suspected issue:

Setting Use For
Main Thread Checker UI work off the main thread
Thread Sanitizer Data races and unsafe shared state
Address Sanitizer Buffer overflows and use-after-free
Malloc Stack Logging Allocation call stacks
Zombie Objects Messages to deallocated objects

MetricKit Hook

Suggest MetricKit for production monitoring of launch, responsiveness, memory, and diagnostics:

import MetricKit

final class PerformanceReporter: NSObject, MXMetricManagerSubscriber {
    func startCollecting() {
        MXMetricManager.shared.add(self)
    }

    func didReceive(_ payloads: [MXMetricPayload]) {
        for payload in payloads {
            if let launch = payload.applicationLaunchMetrics {
                log("Resume time: \(launch.histogrammedResumeTime)")
            }
            if let responsiveness = payload.applicationResponsivenessMetrics {
                log("Hang time: \(responsiveness.histogrammedApplicationHangTime)")
            }
            if let memory = payload.memoryMetrics {
                log("Peak memory: \(memory.peakMemoryUsage)")
            }
        }
    }

    func didReceive(_ payloads: [MXDiagnosticPayload]) {
        for payload in payloads {
            if let hangs = payload.hangDiagnostics {
                for hang in hangs {
                    log("Hang: \(hang.callStackTree)")
                }
            }
        }
    }
}

Review Checklist

Responsiveness:

  • No synchronous work on the main thr
자주 묻는 질문

어떤 도구를 사용하나요?

Apple의 Instruments, Xcode 진단 도구, MetricKit을 사용합니다. 직접 만든 작업을 잴 때는 signpost 표시도 씁니다.

추측으로 수정하나요?

아닙니다. 이 스킬은 에이전트가 모든 변경을 실제 측정으로 확인하도록 합니다.

앱 스토어 출시 준비도 다루나요?

네. 출시 전 성능 점검도 포함되어 있습니다.

상세 정보

작성자의 원본 설명

Guide performance profiling for Apple platform apps with Instruments, Xcode diagnostics, and MetricKit. Use when investigating app hangs, stutters, high CPU, memory leaks, memory growth, OOM crashes, slow launch, battery drain, thermal issues, App Store performance readiness, or when adding os_signpost and measurement hooks.

repo: MengTo/Skills

인기도

GitHub 스타
7.2k
순위
#13340
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬