Avoid double logging component render time#32749
Merged
sebmarkbage merged 1 commit intofacebook:mainfrom Mar 26, 2025
Merged
Conversation
6fdfda7 to
fbd62e7
Compare
|
Comparing: 4845e16...fbd62e7 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
eps1lon
approved these changes
Mar 25, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Mar 26, 2025
This got moved into the functional component and class component case statements here: 0de1233. So that we could separate the error case for class components. However, due to a faulty rebase this got restored at the top as well. Leading to double component renders being logged. In the other offscreen reconnect passes we don't do this in each case statement but still once at the top. The reason this doesn't matter is because use the PerformedWork flag and that is only set for function and class components. Although maybe it should be set for expensive DOM components too and then we have to remember this. DiffTrain build for [f9e1b16](f9e1b16)
eps1lon
pushed a commit
to vercel/next.js
that referenced
this pull request
Mar 26, 2025
[diff facebook/react@740a4f7a...313332d1](facebook/react@740a4f7...313332d) <details> <summary>React upstream changes</summary> - facebook/react#32741 - facebook/react#32726 - facebook/react#32752 - facebook/react#32749 - facebook/react#32748 - facebook/react#32746 </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This got moved into the functional component and class component case statements here: 0de1233. So that we could separate the error case for class components.
However, due to a faulty rebase this got restored at the top as well. Leading to double component renders being logged.
In the other offscreen reconnect passes we don't do this in each case statement but still once at the top. The reason this doesn't matter is because use the PerformedWork flag and that is only set for function and class components. Although maybe it should be set for expensive DOM components too and then we have to remember this.