Socket
Socket
Sign inDemoInstall

require-so-slow

Package Overview
Dependencies
156
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    require-so-slow

`require`s taking too much time? Profile 'em.


Version published
Weekly downloads
386
decreased by-12.47%
Maintainers
2
Install size
3.05 MB
Created
Weekly downloads
 

Changelog

Source

2.0.5 (2021-01-10)

Bug Fixes

  • deps: update dependency meow to v9 (#85) (c8e1c62)

Readme

Source

require-so-slow

  • Wondering why your applications is slow to start?
  • require seems to take an eternity?
  • Wonder no more!

This module produces a timeline of your requires and produces an output that you can load in the Chrome Timeline Viewer.

Trace Viewer

Click on the image above to go see an interactive version.

Command Line Usage

# Profiles the timeline of requiring `request@latest` and generates a trace
# output file you can load in Chrome Timeline viewer [1]
$ npx require-so-slow request

# You can specify specific versions or dist-tags.
$ npx require-so-slow got@9.0.0
$ npx require-so-slow got@rc

# You can specify what output filename to use:
$ npm require-so-slow -o lodash.trace.json lodash

You can also preload require-so-slow from node:

npm i -D require-so-slow

# Traces the entire execution of entrypoint and writes to
# ./require-so-slow.trace by default
$ node -r require-so-slow [entrypoint]

# The output path can be changed with the TRACE_OUTFILE environent variable

API

const requireSoSlow = require('require-so-slow');

// load stuff, run stuff.
require('request');

// Write a trace file at some point.
requireSoSlow.write('require-trace.trace');

Keywords

FAQs

Last updated on 16 Feb 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc