116
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill einverne/dotfiles --skill performance-optimizer- SKILL.md7.1 KB
Overview
This skill provides practical performance analysis and optimization guidance for code and systems, focused on identifying bottlenecks and delivering measurable improvements. It combines profiling tactics, optimization patterns, and verification steps to reduce resource usage and speed up real workloads. Use it when you need targeted, evidence-based performance work rather than guesswork.
How this skill works
I guide you to establish baseline metrics, run the right profilers for your stack (Python, Node, shell, system), and isolate hot paths using data, not intuition. Once the bottleneck is identified, I recommend targeted optimizations (algorithmic changes, caching, I/O batching, vectorization, parallelism) and provide verification steps—benchmarks, regressions checks, and monitoring. The process emphasizes measurable gains and maintaining correctness.
When to use it
- When a service or script is too slow and you need the root cause
- Before investing time in large refactors or low-level rewrites
- When memory usage grows unexpectedly or leaks are suspected
- To establish performance budgets and SLA targets
- When deploying to production and you need safe profiling and monitoring
Best practices
- Always measure first: profile to find real bottlenecks before changing code
- Fix the highest-impact hotspot first (80/20 rule) and avoid micro-optimizations
- Prefer algorithmic improvements over micro-tweaks; document trade-offs
- Use representative data, warm-up runs, and multiple iterations for benchmarks
- Verify changes with tests, benchmarks, and monitoring to catch regressions
Example use cases
- Speed up a Python data pipeline by replacing O(n²) patterns with set lookups or vectorized NumPy operations
- Reduce I/O latency by batching writes and switching to buffered I/O for large files
- Diagnose high CPU in production using sampling profilers, then apply caching or async processing
- Optimize shell scripts by replacing unnecessary subshells and using xargs for parallel work
- Improve database performance by adding indexes, fixing N+1 queries, and introducing a caching layer
FAQ
Start by recording baseline metrics and running a CPU/memory profiler for the slow component; focus on the top callers consuming most time or memory.
When should I avoid optimizing?
Avoid optimizations if performance already meets requirements, the change harms readability/maintainability excessively, or you lack profiling evidence showing benefit.