Skip to content

Avoid double logging component render time #32749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

sebmarkbage
Copy link
Collaborator

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.

@react-sizebot
Copy link

Comparing: 4845e16...fbd62e7

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 515.14 kB 515.14 kB = 91.74 kB 91.74 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 614.35 kB 614.35 kB = 108.76 kB 108.76 kB
facebook-www/ReactDOM-prod.classic.js = 650.34 kB 650.34 kB = 114.79 kB 114.79 kB
facebook-www/ReactDOM-prod.modern.js = 640.62 kB 640.62 kB = 113.23 kB 113.23 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against fbd62e7

@sebmarkbage sebmarkbage merged commit f9e1b16 into facebook:main Mar 26, 2025
241 checks passed
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
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