-
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
[Fiber] Log the Render/Commit phases and the gaps in between #31016
Merged
Conversation
This file contains 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
This affects the Profiler component as well but really this metric should indicate when we started the commit and if something else was blocking it before. Usually there's nothing in before mutation effects.
…ssive If the commit phase is delayed due to throttling we log the phase in between as "Throttled". If it's delayed due to CSS/image suspending then we log it as "Suspended". If the passive phase is delayed until the scheduled task we log it as "Waiting for Paint". If the passive phase is immediate or forced due to another update, we don't log anything about the gap.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
facebook-github-bot
added
CLA Signed
React Core Team
Opened by a member of the React Core Team
labels
Sep 21, 2024
Comparing: 5d19e1c...f91dc20 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
|
Since multiple roots can start rendering and overriding these while the commit is still pending. Then we need to stash it temporarily on module scope for the passive effect. Same as lanes.
This lets us log this phase differently if it is interrupted before commit.
acdlite
approved these changes
Sep 23, 2024
github-actions bot
pushed a commit
that referenced
this pull request
Sep 23, 2024
A slight behavior change here too is that I now mark the start of the commit phase before the BeforeMutationEffect phase. This affects `<Profiler>` too. The named sequences are as follows: Render -> Suspended or Throttled -> Commit -> Waiting for Paint -> Remaining Effects The Suspended phase is only logged if we delay the Commit due to CSS / images. The Throttled phase is only logged if we delay the commit due to the Suspense throttling timer. <img width="1246" alt="Screenshot 2024-09-20 at 9 14 23 PM" src="https://github.com/user-attachments/assets/8d01f444-bb85-472b-9b42-6157d92c81b4"> I don't yet log render phases that don't complete. I think I also need to special case renders that or don't commit after being suspended. DiffTrain build for commit 4e9540e.
github-actions bot
pushed a commit
that referenced
this pull request
Sep 23, 2024
A slight behavior change here too is that I now mark the start of the commit phase before the BeforeMutationEffect phase. This affects `<Profiler>` too. The named sequences are as follows: Render -> Suspended or Throttled -> Commit -> Waiting for Paint -> Remaining Effects The Suspended phase is only logged if we delay the Commit due to CSS / images. The Throttled phase is only logged if we delay the commit due to the Suspense throttling timer. <img width="1246" alt="Screenshot 2024-09-20 at 9 14 23 PM" src="https://github.com/user-attachments/assets/8d01f444-bb85-472b-9b42-6157d92c81b4"> I don't yet log render phases that don't complete. I think I also need to special case renders that or don't commit after being suspended. DiffTrain build for [4e9540e](4e9540e)
This was referenced Sep 24, 2024
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.
A slight behavior change here too is that I now mark the start of the commit phase before the BeforeMutationEffect phase. This affects
<Profiler>
too.The named sequences are as follows:
Render -> Suspended or Throttled -> Commit -> Waiting for Paint -> Remaining Effects
The Suspended phase is only logged if we delay the Commit due to CSS / images.
The Throttled phase is only logged if we delay the commit due to the Suspense throttling timer.
I don't yet log render phases that don't complete. I think I also need to special case renders that or don't commit after being suspended.