Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only log component level profiling for components that actually perfo…
…rmed work (facebook#31522) This provides less context but skips a lot of noise. Previously we were including parent components to provide context about what is rendering but this turns out to be: 1) Very expensive due to the overhead of `performance.measure()` while profiling. 2) Unactionable noise in the profile that hurt more than it added in real apps with large trees. This approach instead just add performance.measure calls for each component that was marked as PerformedWork (which was used for this purpose by React Profiler) or had any Effects. Not everything gets marked with PerformedWork though. E.g. DOM nodes do not but they can have significant render times since creating them takes time. We might consider including them if a self-time threshold is met. Because there is little to no context about the component anymore it becomes really essential to get a feature from Chrome DevTools that can link to something with more context like React DevTools.
- Loading branch information