-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[Perf Tracks]: Clear potentially large measures #34803
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
[Perf Tracks]: Clear potentially large measures #34803
Conversation
}; | ||
|
||
const resuableChangedPropsEntry = ['Changed Props', '']; | ||
const reusableChangedPropsEntry = ['Changed Props', '']; |
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.
drive-by typo fix
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 only drawback I can think of right now is that they won't be available in performance.getEntries() and PerformanceObserver, but that doesn't really make any sense for DEV envs.
Why not? These APIs can be used to display the data in custom profiler UIs that want more control over what and how they display data.
Is Chrome indefinitely holding onto these entries even if no PerformanceObserver is registered?
It is technically feasible, I am just not sure why would someone do it via User Timings in DEV.
I am not sure, but it looks like so. Having an Observer doesn't imply clearing buffered entries, so I guess we need to do it manually. I think we should do it after every I've validated that clearing measures doesn't affect availability of entries to |
0d9a0b5
to
41bc2de
Compare
So it's just the Though I don't see how the linked spec text confirms that. |
Sorry, summary was not up to date, actually
The value is pushed to the observed entries list as part of the |
41bc2de
to
11a58a3
Compare
11a58a3
to
b42f3b2
Compare
Fixes #34770. We need to clear measures at some point, otherwise all these copies of props that we end up recording will allocate too much memory in Chromium. This adds `performance.clearMeasures(...)` calls to such cases in DEV. Validated that entries are still shown on Performance panel timeline. DiffTrain build for [b9ec735](b9ec735)
Fixes #34770. We need to clear measures at some point, otherwise all these copies of props that we end up recording will allocate too much memory in Chromium. This adds `performance.clearMeasures(...)` calls to such cases in DEV. Validated that entries are still shown on Performance panel timeline. DiffTrain build for [b9ec735](b9ec735)
Fixes #34770.
We need to clear measures at some point, otherwise all these copies of props that we end up recording will allocate too much memory in Chromium. This adds
performance.clearMeasures(...)
calls to such cases in DEV.Validated that entries are still shown on Performance panel timeline.