node --max-old-space-size=4096 app.jsCommon for builds, SSR, and memory-heavy workloads.
Node.js CLI performance cheat sheets for memory tuning, CPU profiling, heap analysis, coverage, and source-map-aware debugging.
Tune heap sizes and collect performance data.
node --max-old-space-size=4096 app.jsCommon for builds, SSR, and memory-heavy workloads.
node --prof app.jsUseful in performance debugging workflows.
node --cpu-prof app.jsModern performance workflow for realistic workloads.
node --heap-prof app.jsHelpful when tracking memory growth and allocations.
node --heapsnapshot-signal=SIGUSR2 app.jsUseful for long-running services where you want snapshots without stopping the process.
node --trace-gc app.jsHelpful when investigating memory pressure or GC pauses.
NODE_V8_COVERAGE=./coverage node app.jsUseful for diagnostics or integrating with coverage tooling.
node --enable-source-maps dist/server.jsImportant for transpiled TypeScript or bundled code.