Inline the trace parser, modernise the event classifier, add three new analyses#2461
Merged
soulgalore merged 1 commit intomainfrom May 6, 2026
Merged
Inline the trace parser, modernise the event classifier, add three new analyses#2461soulgalore merged 1 commit intomainfrom
soulgalore merged 1 commit intomainfrom
Conversation
…w analyses
- Replace the unmaintained @sitespeed.io/tracium dependency (extracted from Lighthouse circa 2017, last release 0.3.3) with an
in-tree ESM port at lib/chrome/trace/. computeMainThreadTasks is byte-equivalent so existing result.cpu.{categories,events,urls}
consumers see no change.
- Modernise the event classifier. The original list only knew about ~30 event names, so on busy 2026-era pages roughly half the
trace fell through to "other" — on a sample cnet run that meant 1.3 s of "other" hiding RunTask, v8.run,
IntersectionObserverController::computeIntersections, PrePaint, Commit, Layerize, v8.callFunction, V8.DeserializeContext and
friends. The expanded list (drawing from modern Lighthouse + the WebPageTest-derived map in waterfall-tools + direct sampling of
real traces) reclassifies ~1.5 s of that "other" into the right buckets. A new groupForEvent() lookup adds prefix matching for
V8.GC* so future V8 GC phases auto-classify without enumeration.
- Add three new analyses on result.cpu, each independently computed and wrapped in its own try/catch so a bug in one can't poison
the existing payload:
- scriptCosts — Lighthouse-style per-URL parse / compile / execute / total breakdown.
- forcedReflows — Layout / UpdateLayoutTree events nested under JS-driven tasks (EventDispatch, FunctionCall, TimerFire,
FireAnimationFrame, …) with the script that triggered each.
- nonCompositedAnimations — Animation events whose compositeFailed bitmask is non-zero, with the unsupported properties.
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
Change-Id: I085d3ef2bd32bcf663c6b764d1551c59a544a165
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
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.
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
Change-Id: I085d3ef2bd32bcf663c6b764d1551c59a544a165