-
Notifications
You must be signed in to change notification settings - Fork 49.6k
Fix Bugs Measuring Performance Track for Effects #32815
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
Conversation
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
Comparing: b10cb4c...8d69468 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
|
ef1be47
to
8d69468
Compare
rickhanlonii
approved these changes
Apr 4, 2025
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.
push pop push pop
sebmarkbage
added a commit
that referenced
this pull request
Apr 4, 2025
Stacked on #32815. To be able to differentiate mounted subtrees from updated subtrees. This adds a yellow entry above the component subtree that mounted. This is added both to the render phase, mutation effect phase, layout effect phase and passive effect phase. <img width="962" alt="Screenshot 2025-04-03 at 10 41 02 PM" src="https://github.com/user-attachments/assets/13777347-07e8-458c-9127-8675ef08b54f" /> Ideally we could probably give an annotation to the component instead of adding a whole other line which is also a color that's kind of distracting. However, not all components are included and keeping track of which one is the first one below is kind of annoying. Adding a marker to all components is kind of noisy. So this is a compromise. It's only one per depth so it won't make it too deep even on larger trees. If this is an unmount, those are added to the mutation effect phase for the layout unmounts and passive unmount effect phase. Since these never have a render, they're not in the render phase. <img width="1010" alt="Screenshot 2025-04-03 at 11 05 57 PM" src="https://github.com/user-attachments/assets/ab39f27e-13be-4281-94fa-9391bb293fd2" /> For showing / hiding `<Activity>` the terminology "Reconnect" and "Disconnect" is used instead.
github-actions bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
This fixes two bugs with commit phase effect tracking. I missed, or messed up the rebase for, deletion effects when a subtree was deleted and for passive disconnects when a subtree was hidden. The other bug is that when I started using self time (componentEffectDuration) for color and for determining whether to bother logging an entry, I didn't consider that the component with effects can have children which end up resetting this duration before we log. Which lead to most effects not having their components logged since they almost always have children. We don't necessarily have to push/pop but we have to store at least one thing on the stack unfortunately. That's because we have to do the actual log after the children to get the right end time. So might as well use the push/pop strategy like the rest of them. DiffTrain build for [c0f08ae](c0f08ae)
github-actions bot
pushed a commit
that referenced
this pull request
Apr 4, 2025
This fixes two bugs with commit phase effect tracking. I missed, or messed up the rebase for, deletion effects when a subtree was deleted and for passive disconnects when a subtree was hidden. The other bug is that when I started using self time (componentEffectDuration) for color and for determining whether to bother logging an entry, I didn't consider that the component with effects can have children which end up resetting this duration before we log. Which lead to most effects not having their components logged since they almost always have children. We don't necessarily have to push/pop but we have to store at least one thing on the stack unfortunately. That's because we have to do the actual log after the children to get the right end time. So might as well use the push/pop strategy like the rest of them. DiffTrain build for [c0f08ae](c0f08ae)
This was referenced Apr 4, 2025
acdlite
added a commit
to acdlite/next.js
that referenced
this pull request
Apr 5, 2025
<details> <summary>React upstream changes</summary> - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
acdlite
pushed a commit
to vercel/next.js
that referenced
this pull request
Apr 7, 2025
[diff facebook/react@040f8286...33661467](facebook/react@040f828...3366146) <details> <summary>React upstream changes</summary> - facebook/react#32823 - facebook/react#32822 - facebook/react#32825 - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
feedthejim
pushed a commit
to vercel/next.js
that referenced
this pull request
May 14, 2025
[diff facebook/react@040f8286...33661467](facebook/react@040f828...3366146) <details> <summary>React upstream changes</summary> - facebook/react#32823 - facebook/react#32822 - facebook/react#32825 - facebook/react#32821 - facebook/react#32819 - facebook/react#32816 - facebook/react#32815 - facebook/react#32812 - facebook/react#32762 - facebook/react#32808 - facebook/react#32807 </details>
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 fixes two bugs with commit phase effect tracking.
I missed, or messed up the rebase for, deletion effects when a subtree was deleted and for passive disconnects when a subtree was hidden.
The other bug is that when I started using self time (componentEffectDuration) for color and for determining whether to bother logging an entry, I didn't consider that the component with effects can have children which end up resetting this duration before we log. Which lead to most effects not having their components logged since they almost always have children.
We don't necessarily have to push/pop but we have to store at least one thing on the stack unfortunately. That's because we have to do the actual log after the children to get the right end time. So might as well use the push/pop strategy like the rest of them.