ReactDefaultPerf.printWasted() doesn't work
See original GitHub issueCalling ReactDefaultPerf.printWasted()
results in:
Uncaught TypeError: Cannot read property 'forEach' of undefined
writes.(anonymous function).forEach @ ReactDefaultPerfAnalysis.js:195
Object.keys.forEach @ ReactDefaultPerfAnalysis.js:192
getUnchangedComponents @ ReactDefaultPerfAnalysis.js:191
getInclusiveSummary @ ReactDefaultPerfAnalysis.js:139
ReactDefaultPerf.getMeasurementsSummaryMap @ ReactDefaultPerf.js:118
ReactDefaultPerf.printWasted @ ReactDefaultPerf.js:133
(this is on a page internally at Facebook so I assume it’s a fairly recent React version)
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
How to identify and resolve wasted renders in React
First, we developers should understand how React works. How do the components live through the component lifecycles in the applications lifetime ...
Read more >how to check wasted renders in component react
I am trying to debug performance issues in a ...
Read more >Performance Tools - React
The following methods use the measurements returned by Perf.getLastMeasurements() to pretty-print the result. printInclusive(); printExclusive(); printWasted() ...
Read more >How to Optimize Components to Improve React Performance
In this tutorial, you will learn how to maximize React performance by measuring rendering bottlenecks and optimizing your components.
Read more >[bug] Problems of using react-addons-perf · Issue #6949 · facebook ...
I'm getting results back from Perf.getWasted(measurements) but I'm seeing this warning crop up too: Warning: There is an internal error in the React...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes.
ReactPerf.start()
,ReactPerf.stop()
and the rest of the Perf API works, for exampleReactPerf.printExclusive()
, but notReactPerf.printWasted()
.I changed over to my 0.14.7 branch, and there everything works like it should, and I double checked that both ReactPerf and React was on 15.0.1.
I can dig around a bit more if this isn’t anything known.
Thank you, this is very helpful! I’ll dig into it and see if I can repro this given the new info.