-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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] Color Performance Track Entries by Self Time #30984
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comparing: e1c2090...0d782cc Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
@@ -54,6 +54,44 @@ export function logComponentRender( | |||
return; | |||
} | |||
if (supportsUserTiming) { | |||
let selfTime: number = (fiber.actualDuration: any); | |||
for (let child = fiber.child; child !== null; child = child.sibling) { | |||
selfTime -= (child.actualDuration: any); |
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 don't love this loop for every rendered component. We could maybe change how we keep track of this but that might require another field. We could also maybe keep track of this by reusing the commit loop.
f4900e9
to
d771ad9
Compare
d771ad9
to
540bff7
Compare
540bff7
to
665efad
Compare
Stacked on #30983. This colors each component entry by its self time from light to dark depending on how long it took. If it took longer than a cut off we color it red (the error color). <img width="435" alt="Screenshot 2024-09-16 at 11 48 15 PM" src="https://github.com/user-attachments/assets/5d0bda83-6205-40e9-bec1-b81db2d48b2d"> DiffTrain build for [8dfbd16](8dfbd16)
Stacked on #30983.
This colors each component entry by its self time from light to dark depending on how long it took. If it took longer than a cut off we color it red (the error color).