Skip to content

Inline the trace parser, modernise the event classifier, add three new analyses#2461

Merged
soulgalore merged 1 commit intomainfrom
inline-trace
May 6, 2026
Merged

Inline the trace parser, modernise the event classifier, add three new analyses#2461
soulgalore merged 1 commit intomainfrom
inline-trace

Conversation

@soulgalore
Copy link
Copy Markdown
Member

  • 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

…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
@soulgalore soulgalore merged commit 1d34fa8 into main May 6, 2026
16 checks passed
@soulgalore soulgalore deleted the inline-trace branch May 6, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant