orbitdock-memory-profiling
GitHub提供 OrbitDock 在 macOS 上的内存与运行时行为分析技能,通过脚本或 CLI 工具捕获快照、对比差异并解读热点,用于排查内存泄漏及性能问题。
Trigger Scenarios
Install
npx skills add Robdel12/OrbitDock --skill orbitdock-memory-profiling -g -y
SKILL.md
Frontmatter
{
"name": "orbitdock-memory-profiling",
"description": "Profile OrbitDock memory and runtime behavior using macOS CLI tools. Use when investigating high memory usage, memory growth over time, Core Animation or mmap\/vm_allocate-heavy stacks, leak suspicion, or regressions that need reproducible vmmap\/sample\/xctrace evidence."
}
OrbitDock Memory Profiling
Overview
Capture reproducible OrbitDock memory artifacts from the command line, then map hotspots back to likely UI or rendering causes.
Workflow
- Identify the target process.
- Capture baseline snapshots.
- Reproduce the issue.
- Capture post-repro snapshots.
- Compare outputs and form hypotheses.
Prefer using scripts/capture_memory_profile.sh for consistency.
Run The Script
Run a full capture for the latest OrbitDock process:
scripts/capture_memory_profile.sh
Run a targeted capture:
scripts/capture_memory_profile.sh \
--pid 9718 \
--sample-seconds 5 \
--trace-seconds 10 \
--out-dir /tmp/orbitdock-profile
Manual Commands
Use these directly when you need finer control:
pgrep -lf OrbitDock
ps -o pid,ppid,rss,vsz,%mem,etime,command -p <PID>
vmmap -summary <PID>
sample <PID> 5 1
xctrace record --template 'Allocations' --attach <PID> --time-limit 10s --output /tmp/orbitdock-alloc.trace
xctrace export --input /tmp/orbitdock-alloc.trace --toc
Permission Handling
If vmmap, sample, leaks, or xctrace fails with permission errors, request elevated execution and rerun the same command.
Interpretation Guide
Read references/interpretation.md for quick heuristics on:
- CoreAnimation and image-backed growth
- MALLOC_SMALL and fragmentation signals
- Peak vs current footprint interpretation
- Stack patterns that implicate rendering, focus rings, or image decode paths
Output Expectations
The capture script writes:
ps.txtvmmap-summary.txtsample.txtallocations.traceandxctrace-toc.xml(if tracing enabled)capture-summary.txt
Use these artifacts to compare before/after repro windows and support fixes with evidence.
Version History
- 6926bc3 Current 2026-07-25 08:33


