optimizing-performance

Profile applications and optimize bottlenecks using measure-first performance analysis workflows.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/dallascrilley/dowser --skill optimizing-performance-dallascrilley
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: optimizing-performance
Source: https://github.com/dallascrilley/dowser/tree/main/skills/optimizing-performance
Command: npx skills add https://github.com/dallascrilley/dowser --skill optimizing-performance-dallascrilley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow endpoints, memory leaks, and high CPU usage are hard to fix without data. This Skill enforces a measure-first approach so you profile real bottlenecks before optimizing, avoiding premature optimization and unreadable micro-optimizations. ## Core Features & Use Cases - Profiling Guidance: Step-by-step instructions for Node.js (--prof, clinic.js, 0x), Python (cProfile, memory_profiler), browser DevTools, and system tools (htop, vmstat, hyperfine). - Optimization Patterns: Algorithm improvements, caching, batching, parallel queries, database indexing, and memory optimization with before/after code examples. - Trade-off Analysis: A decision framework weighing performance gains against code complexity, plus regression testing and monitoring plans. - Use Case: An API endpoint responds in 450ms. Profile it with clinic.js, identify sequential database queries as the bottleneck, parallelize them with Promise.all, and verify a 3x improvement with autocannon. ## Quick Start Ask the AI to profile your slow Node.js API endpoint, identify the top bottleneck, and propose an optimized implementation with benchmark comparisons.

Frequently Asked Questions about optimizing-performance

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

FAQPage Schema
How do I profile a Node.js application to find bottlenecks?▼

Run node --prof app.js and process the output with node --prof-process, or use clinic doctor for interactive analysis and 0x for flamegraphs. These tools rank functions by CPU time so you can target the biggest bottleneck first.

How to optimize slow database queries in an API endpoint?▼

Use EXPLAIN ANALYZE to inspect query plans, add appropriate indexes, select only needed columns, and run independent queries in parallel with Promise.all. Benchmark before and after with autocannon to confirm measurable improvement.

What tools can detect memory leaks in Python applications?▼

Use memory_profiler to track memory usage line by line and py-spy as a sampling profiler for running processes. For CPU hotspots, cProfile and line_profiler identify the functions consuming the most time.

When should I not optimize code performance?▼

Avoid optimizing when no profiling data shows a problem, the code runs rarely or off the critical path, or the project is still in early prototyping. Premature optimization adds complexity and maintenance cost without measurable benefit.

How do I set up performance regression testing?▼

Install autocannon as a dev dependency and add load-test benchmarks to your CI/CD pipeline. Compare response time percentiles and throughput against baseline metrics so regressions fail the build before deployment.