Profile and optimize a Node.js service
Profile a Node.js service with clinic.js or the V8 profiler, generate a flamegraph, identify the top hotspots, apply fixes, and re-profile to confirm improvement.
Preview
Copy prompt
Profile a Node.js service consuming too much CPU using clinic.js or the V8 flame profiler. Identify the top three CPU hotspots. For each: describe the cause, apply a specific fix such as eliminating synchronous fs calls, reducing GC pressure by reusing objects, or switching from buffering to streaming for large payloads. Re-profile after each change to confirm measurable improvement.
More
Performance
Prompts
