Files
gh-greyhaven-ai-claude-code…/skills/memory-profiling/reference/INDEX.md
2025-11-29 18:29:23 +08:00

2.9 KiB

Memory Profiler Reference

Quick reference guides for memory optimization patterns, profiling tools, and garbage collection.

Reference Guides

Memory Optimization Patterns

File: memory-optimization-patterns.md

Comprehensive catalog of memory leak patterns and their fixes:

  • Event Listener Leaks: EventEmitter cleanup, closure traps
  • Connection Pool Leaks: Database connection management
  • Large Dataset Patterns: Streaming, chunking, lazy evaluation
  • Cache Management: LRU caches, WeakMap/WeakSet
  • Closure Memory Traps: Variable capture, scope management

Use when: Quick lookup for specific memory leak pattern


Profiling Tools Comparison

File: profiling-tools.md

Comparison matrix and usage guide for memory profiling tools:

  • Node.js: Chrome DevTools, heapdump, memwatch-next, clinic.js
  • Python: Scalene, memory_profiler, tracemalloc, py-spy
  • Monitoring: Prometheus, Grafana, DataDog APM
  • Tool Selection: When to use which tool

Use when: Choosing the right profiling tool for your stack


Garbage Collection Guide

File: garbage-collection-guide.md

Understanding and tuning garbage collectors:

  • V8 (Node.js): Generational GC, heap structure, --max-old-space-size
  • Python: Reference counting, generational GC, gc.collect()
  • GC Monitoring: Metrics, alerts, optimization
  • GC Tuning: When and how to tune

Use when: GC issues, tuning performance, understanding memory behavior


Quick Lookup

Common Patterns:

Tool Selection:

GC Issues:


Return to main agent