-
Notifications
You must be signed in to change notification settings - Fork 48.8k
Profiler: Don't count timed out (hidden) subtrees in base duration #18966
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
Profiler: Don't count timed out (hidden) subtrees in base duration #18966
Conversation
@@ -1725,6 +1725,18 @@ function resetChildLanes(completedWork: Fiber) { | |||
treeBaseDuration += child.treeBaseDuration; | |||
child = child.sibling; | |||
} | |||
|
|||
const isTimedOutSuspense = |
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.
Implementation note: I chose to subtract the base duration value after the child loop, rather than doing the check inline, because a single check with a possible subtraction seemed better than a frequent check inside of the child loop. Happy to refactor if there's concern about the approach.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e7b3c1e:
|
Details of bundled changes.Comparing: a30a1c6...e7b3c1e react-native-renderer
react-dom
react-art
react-test-renderer
react-reconciler
Size changes (stable) |
Details of bundled changes.Comparing: a30a1c6...e7b3c1e react-dom
react-art
react-test-renderer
react-reconciler
react-native-renderer
Size changes (experimental) |
The Profiler previously over-reported the base duration value by including times pent in hidden subtrees.