profile-performance

Diagnose UI freezes and main-thread hangs in the Moolah macOS app using stack sampling and Instruments.

1|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/moolah-rocks/moolah-native --skill profile-performance-moolah-rocks
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: profile-performance
Source: https://github.com/moolah-rocks/moolah-native/tree/main/.claude/skills/profile-performance
Command: npx skills add https://github.com/moolah-rocks/moolah-native --skill profile-performance-moolah-rocks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When the Moolah app freezes, beachballs, or feels slow, you need to know exactly which code is blocking the main thread. This Skill provides a systematic workflow for capturing stack samples, reading built-in performance logs, and recording Instruments traces to pinpoint the bottleneck. ## Core Features & Use Cases - Stack Sampling: Capture 3-second stack samples of the running app with the sample tool and read the main-thread call graph to find the deepest, hottest frames. - Performance Log Analysis: Monitor built-in ⚠️ PERF: and 📊 SYNC SESSION log lines that report sync batch timing, balance invalidation cost, and per-store reload durations. - Instruments Profiling: Record Time Profiler and os_signpost traces via xctrace for visual timeline analysis of custom signpost intervals like applyRemoteChanges and recomputeAllBalances. - Use Case: A user reports the app hangs when opening a profile with many transactions. Launch the app with log capture, reproduce the freeze, capture a stack sample mid-hang, and grep the performance logs to identify whether sync, balance recomputation, or store reloads caused the stall. ## Quick Start Ask the AI to diagnose why the Moolah app is frozen by capturing a stack sample of the running process and checking the performance logs.

Frequently Asked Questions about profile-performance

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

FAQPage Schema
How do I diagnose a frozen macOS app with stack sampling?▼

Run `sample <PID> 3 -f output.txt` against the app's process ID to capture stack traces every 1ms for 3 seconds. Then examine the main thread (com.apple.main-thread) call graph — the deepest frames with the highest sample counts indicate where time is spent.

How do I record an Instruments trace from the command line?▼

Use `xctrace record --template 'Time Profiler' --attach <PID> --time-limit 10s --output profile.trace`. List available templates with `xctrace list templates`. The resulting .trace file opens in Instruments.app for visual timeline analysis.

Can xctrace trace files be read without Instruments?▼

No, xctrace output is a binary format that can only be viewed in Instruments.app. For automated or text-based diagnosis, use the `sample` tool for stack captures or grep the app's performance logs instead.

What do the PERF warning logs in the Moolah app mean?▼

Lines like `⚠️ PERF: applyRemoteChanges blocked main thread for Xms` report per-batch sync timing with upsert versus save breakdowns. Other warnings cover balance invalidation, store reloads after sync, and system fields cache serialization.

Why does the app hang during iCloud sync?▼

Check the SYNC SESSION COMPLETE summary and PERF logs for cumulative times per phase. Signposts like applyRemoteChanges, invalidateCachedBalances, and recomputeAllBalances show whether record upserts, deletions, or balance recomputation are blocking the main thread.