React-devtools: Profiler: Improve "render count" UX

Created on 27 Aug 2018  ·  4Comments  ·  Source: facebook/react-devtools

The render count label is confusing since it's a count of renders for the entire app lifetime and not just the window of time when we were recording.

Try adding a WeakMap to count the number of times each internal instance renders while profiling. This way the values shown will be more like the times shown– relative to the profiling session.

enhancement profiler

Most helpful comment

I was wondering why my components are getting rendered(as per profiler's "Total renders") so many times for a single action. I was scratching my head for 1 day until I found this to understand the meaning of "Total Renders"

Ideally it should show the render count corresponding to profiling session duration. If this is going to take time, it would be great if you can change the label to something to clearly indicate the lifetime renders for now.

All 4 comments

I just found this because I was unsure about the meaning of "Total renders". It still wasn't clear to me that this meant the lifetime count – I thought it meant "Total renders for this commit". Should it be called "Lifetime renders" or "Total renders (lifetime)"?

Yeah maybe 'total renders' 😄

I was wondering why my components are getting rendered(as per profiler's "Total renders") so many times for a single action. I was scratching my head for 1 day until I found this to understand the meaning of "Total Renders"

Ideally it should show the render count corresponding to profiling session duration. If this is going to take time, it would be great if you can change the label to something to clearly indicate the lifetime renders for now.

React DevTools has been rewritten and recently launched a new version 4 UI. The source code for this rewrite was done in a separate repository and now lives in the main React repo (github.com/facebook/react).

Because version 4 was a total rewrite, and all issues in this repository are related to the old version 3 of the extension, I am closing all issues in this repository. If you can still reproduce this issue, or believe this feature request is still relevant, please open a new issue in the React repo: https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools

Was this page helpful?
0 / 5 - 0 ratings