-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comparing: 8a41d6c...05c3c24 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
endTime: number, | ||
): void { | ||
if (supportsUserTiming) { | ||
reusableLaneDevToolDetails.color = 'error'; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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)
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)
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:
Errored with a second recovery attempt that also errors: