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

non-performant-detector

v1.1.3

Published

This package will detect non-performant component based on rendering duration

Readme

Installtion

npm i non-performant-detector

Use

    Import  {Insights} from 'non-performnat-detector';
Wrap your component with Insights component like this at the time of invoking it:
    <Insights insightID="UniqueId">
        <YourComponent />
    <Insights>
Give the unique insightID every time you are wrapping it with Insight component

conditions

1. JSX of children of Insights component must have one and only one parent element

    The correct way of writing the code of YourComponent

        <div>
            {…more codes…}
        </div>

    The incorrecy way of writing the code of YourComponent

        <div> ….</div>
        <div> ….</div>
  1. You should not be storing anything in session storage with insightIDs as keys that you are providing while using Insight component.

What this package does

  1. The component Insights checks if its children is performant or non-performant.
  2. This checking is done on the basis of render duration of its children.
  3. If the render duration of children is greater than certain threshold Then it will be declaired non-performant.
  4. Initially this threshold is taken to be 1ms.
  5. This threshold is made configurable, user can change this threshold at any point of time.
  6. If the component is non-performant then a red border is added around the component and a badge is shown in the top right corner of the component.
  7. Clicking on the badge gives information about the render and option to configure threshold. Further it also shows suggestions to improve the render duration of the component.
  8. Above process is termed profiling beacause internally this package is using Profiler component of react.

Drawbacks

  1. If the component is declared non-performant then a red border is added and informantion about its previous border is lost.
  2. User is prohibited to store some information in session storage correspoding to insightIDs provided.
Session storage data that this package stores is used by a browser extension which gives user more options to
configure threshold and It also allows user to turn profiling ON or OFF. 

Link of this browser extension will be updated soon.