core(driver): reduce required traceCategories again #6271
Merged
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.
After #6117 allowed us to remove
toplevel
, I had a feeling we could remove more, likeloading
orbenchmark
trace categories.Tried some things and... we can! It knocks another 20% off the trace size. :)
Details follow..
What trace events do we need?
I started by auditing all the trace events I can tell we care about. And I grabbed the category they're currently traced with in Chromium:
Trace events required by Lighthouse and their assigned categories
Then, what trace categories do we need?
If you then take all the required categories and list em out, you get:
And turns out all the non-bold items all include either 'devtools.timeline' or 'blink.user_timing'.
This means we can stop tracing the following categories:
❌ benchmark
❌ loading
❌ latencyInfo
💣 BOOM! These account for ~20% of some of our larger traces.
Also
disabled-by-default-devtools.timeline.frame
only is used for three trace events. And we've only been collecting them to sum up our mainthread-work-breakdown numbers. However these 3 events are INSTANT events with zero duration, so.. they don't add to the numbers.Lastly I cleaned up some of the trace events mentioned in task-groups, since I now know these events like best friends. :)
Addendum: What's _still_ taking up space in the trace?
First, top events, then top categories:
Basically:
UpdateLayer
event fromdisabled-by-default-devtools.timeline
is SUPER chatty. It's worth hunting down why devtools cares about it. perhaps there's a parent task we can use instead? ALL of them are under 0.3ms long, though 15,000 of them do add up to 376ms. But still....ref #3596