npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

why-slow

v1.1.2

Published

A runtime observer that detects and explains Node.js performance bottlenecks

Readme

why-slow

A zero-configuration Node.js CLI that observes your app at runtime, detects common performance bottlenecks, and explains why your backend is slow in plain language.

Install

npm install why-slow

Or run without installing:

npx why-slow node your-app.js

Usage

why-slow <command> [args...]

Examples:

why-slow node server.js
why-slow node index.js
npx why-slow node examples/slow-app.js

Your app runs as usual; when it exits, why-slow prints a short report with the main reasons and suggestions.

What it detects

| Issue | Severity | What it means | |-------|----------|----------------| | Event loop blocking | High | Sync work or CPU-heavy code is blocking the main thread. | | Synchronous operations | High | readFileSync, writeFileSync, etc. block the event loop. | | Slow async operations | Medium | Some async work takes too long (>500ms). | | Sequential async patterns | Medium | Independent async calls could run in parallel with Promise.all. |

Example output

When issues are found:

============================================================
WHY YOUR BACKEND IS SLOW
============================================================

Main reasons:

🔴 Your backend is slow because the event loop is frequently blocked,
   which causes requests to wait before being processed.
   Mean delay: 45.23ms, Max delay: 120.50ms

🔴 auth.js uses synchronous file operations, which block the event loop.
   Detected: 3 occurrences
   Examples:
     - fs.readFileSync in auth.js (25.30ms)

Suggestions:

• Avoid synchronous operations and heavy CPU work on the main thread.
  Use worker threads for CPU-intensive tasks.
• Replace synchronous operations with their async alternatives
  (fs.promises.readFile, fs.promises.writeFile).

============================================================

When nothing significant is found:

✅ No significant performance issues detected.

How it works

  • CLI (bin/why-slow.js) – Runs your app with node --require <hook> and passes a temp results path.
  • Hook – Loads in your process, attaches observers, and writes a JSON summary on exit.
  • Observers – Event loop delay, sync fs/crypto calls, and (when enabled) async timing.
  • Rules engine – Turns observations into issues and suggestions.
  • Reporter – Prints the final “why your backend is slow” report.

No server, no config files. Uses only Node.js built-ins.

Requirements

  • Node.js ≥ 14.0.0
  • No extra dependencies

License

MIT