What problem does it solve?
Identifying and resolving performance bottlenecks without proper methodology often leads to wasted effort, minimal gains, and even new bugs. This Skill provides a structured, evidence-based approach to performance optimization, ensuring measurable improvements.
Core Features & Use Cases
- Structured Optimization Workflow: Guides through establishing baselines, systematic profiling, root cause analysis, implementing targeted optimizations, and validating improvements.
- Key Performance Indicators: Covers metrics for latency (P50, P95, P99), throughput (RPS, ops/sec), memory (heap usage, GC frequency), and CPU (hot paths, time complexity).
- Profiling Tools & Patterns: Introduces tools for TypeScript/Bun and Rust, along with optimization patterns like algorithmic improvements, memory optimization, I/O optimization, and database optimization.
- Use Case: Diagnose a slow API endpoint by establishing a baseline, profiling its execution to pinpoint the exact bottleneck (e.g., an N+1 database query), and then applying a targeted optimization like batch loading.
Quick Start
Analyze the performance of the 'process_data' function in 'src/data.ts' to identify bottlenecks and suggest optimizations.