Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Nov 12, 2024

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.

…rmed work

This provides less context but skips a lot of noise.
@sebmarkbage sebmarkbage requested review from eps1lon and hoxyq November 12, 2024 19:17
@vercel
Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 7:19pm

@react-sizebot
Copy link

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against 7b6e5f2

@sebmarkbage sebmarkbage merged commit 7ac8e61 into facebook:main Nov 13, 2024
184 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants