Skip to content
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

Log Render Phases that Never Committed #31548

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Nov 15, 2024

This includes:

  • Interrupted Render: Interrupted Renders (setState or ping at higher priority)
  • Prewarm: Suspended Renders outside a Suspense boundary (RootSuspendedWithDelay/RootSuspendedAtTheShell)
  • Errored Render: Render that errored somewhere in the tree (Fatal or Not) (which may or may not be retried and then complete)
  • Teared Render: Due to useSyncExternalStore not matching (which will do another sync attempt)

Suspended Commit:

Screenshot 2024-11-14 at 11 47 40 PM

Errored with a second recovery attempt that also errors:

Screenshot 2024-11-15 at 12 09 06 AM

Copy link

vercel bot commented Nov 15, 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 15, 2024 5:19am

@react-sizebot
Copy link

react-sizebot commented Nov 15, 2024

Comparing: 8a41d6c...05c3c24

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.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js +0.03% 508.90 kB 509.08 kB +0.03% 90.98 kB 91.00 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 +0.03% 513.84 kB 514.01 kB +0.03% 91.68 kB 91.71 kB
facebook-www/ReactDOM-prod.classic.js +0.02% 588.52 kB 588.65 kB +0.02% 104.16 kB 104.18 kB
facebook-www/ReactDOM-prod.modern.js +0.02% 578.79 kB 578.91 kB +0.02% 102.57 kB 102.59 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.js +0.62% 425.11 kB 427.73 kB +0.39% 69.36 kB 69.63 kB
oss-experimental/react-art/cjs/react-art.development.js +0.48% 572.24 kB 575.01 kB +0.29% 92.61 kB 92.87 kB
oss-experimental/react-dom/cjs/react-dom-profiling.profiling.js +0.45% 552.77 kB 555.28 kB +0.34% 98.29 kB 98.63 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +0.43% 654.83 kB 657.65 kB +0.23% 105.24 kB 105.48 kB
oss-experimental/react-dom/cjs/react-dom-client.development.js +0.29% 957.83 kB 960.66 kB +0.22% 162.00 kB 162.35 kB
oss-experimental/react-dom/cjs/react-dom-profiling.development.js +0.29% 974.28 kB 977.10 kB +0.21% 164.83 kB 165.17 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.development.js +0.29% 974.77 kB 977.60 kB +0.21% 165.78 kB 166.14 kB

Generated by 🚫 dangerJS against d88bf01

endTime: number,
): void {
if (supportsUserTiming) {
reusableLaneDevToolDetails.color = 'error';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't an inconsistent render more similar to an interrupted render? It's not really an error if that happens, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue here is that it causes a synchronous render (from a transition) so it's more similar to a recoverable error. In fact, a recoverable error from concurrent is the same concept. An interrupted render doesn't have that issue since it'll be async in the update too.

This shows a downside of using a mutable store over an immutable one.

reusableLaneDevToolDetails.color = 'error';
reusableLaneOptions.start = startTime;
reusableLaneOptions.end = endTime;
performance.measure('Teared Render', reusableLaneOptions);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says "inconsistent" but here we use "teared". I like "teared" more since that's what we used before: reactwg/react-18#69. "tearing" is also easier to google for whereas "inconsistent" is too generic but maybe that's what we need here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated PR description. I just used inconsistent for the function name since that’s what it is called in the internals for now.

@sebmarkbage sebmarkbage merged commit 3720870 into facebook:main Nov 15, 2024
184 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 15, 2024
This includes:

- `Interrupted Render`: Interrupted Renders (setState or ping at higher
priority)
- `Prewarm`: Suspended Renders outside a Suspense boundary
(RootSuspendedWithDelay/RootSuspendedAtTheShell)
- `Errored Render`: Render that errored somewhere in the tree (Fatal or
Not) (which may or may not be retried and then complete)
- `Teared Render`: Due to useSyncExternalStore not matching (which will
do another sync attempt)

Suspended Commit:

<img width="893" alt="Screenshot 2024-11-14 at 11 47 40 PM"
src="https://github.com/user-attachments/assets/b25a6a8b-a5e9-4d66-b325-57aef4bf9dad">

Errored with a second recovery attempt that also errors:

<img width="976" alt="Screenshot 2024-11-15 at 12 09 06 AM"
src="https://github.com/user-attachments/assets/9ce52cbb-b587-4f1e-8b67-e51d9073ae5b">

DiffTrain build for [3720870](3720870)
github-actions bot pushed a commit that referenced this pull request Nov 15, 2024
This includes:

- `Interrupted Render`: Interrupted Renders (setState or ping at higher
priority)
- `Prewarm`: Suspended Renders outside a Suspense boundary
(RootSuspendedWithDelay/RootSuspendedAtTheShell)
- `Errored Render`: Render that errored somewhere in the tree (Fatal or
Not) (which may or may not be retried and then complete)
- `Teared Render`: Due to useSyncExternalStore not matching (which will
do another sync attempt)

Suspended Commit:

<img width="893" alt="Screenshot 2024-11-14 at 11 47 40 PM"
src="https://github.com/user-attachments/assets/b25a6a8b-a5e9-4d66-b325-57aef4bf9dad">

Errored with a second recovery attempt that also errors:

<img width="976" alt="Screenshot 2024-11-15 at 12 09 06 AM"
src="https://github.com/user-attachments/assets/9ce52cbb-b587-4f1e-8b67-e51d9073ae5b">

DiffTrain build for [3720870](3720870)
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