performance_stop_trace shows no CPU/Wasm hotspots on compute-heavy UI

Open
#3,224 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript, wasm

Research direction

Start with src/tools/performance.ts, especially the existing JsSampling trace setup, and trace how performance_stop_trace and performance_analyze_insight produce summaries. Locate the parser and related performance-tool tests before adding JS/Wasm self-time and total-time hotspots, with LoAF timing when available. Done means recorded traces expose a compact CPU/Wasm hotspot summary instead of only DOM/network insights, covered by tests for representative trace data.

Written by the indexing model from the issue text.

Description

collecting-feedback feature

When profiling <canvas>, WebGL/3D, or WebAssembly applications (e.g. Three.js, Unity/PixiJS, or Flutter Web skwasm/canvaskit), performance_stop_trace and performance_analyze_insight return only DOM/network Core Web Vitals insights (LCPBreakdown, RenderBlocking, DocumentLatency, CLSCulprits, INPBreakdown), giving agents zero visibility into where main-thread CPU or Wasm execution time was spent.

User problem
  • On <canvas> and WebGL/Wasm apps, DOM LCP fires immediately as soon as the <canvas> element mounts, while actual bottlenecks happen after mount inside JS/Wasm compute, shader compilation, or long requestAnimationFrame callbacks.
  • performance_start_trace already enables V8 CPU and Wasm sampling (DevTools.TracingOptionalCategories.JsSampling in src/tools/performance.ts#L74-L79), so the sampled call tree is already captured in the trace—agents just have no way to read it without writing custom script parsers against a raw .json.gz file.
Possible directions
  • Surface a compact bottom-up JS/Wasm CPU summary (e.g. top functions by self-time and total-time from the recorded JsSampling profile) in the trace summary or via an insight/tool on the recorded trace.
  • Include long animation frame (LoAF / requestAnimationFrame) timing when present so agents can spot janky frames on canvas/WebGL workloads.
Dominant language
TypeScript
Stars
59.8k
Forks
4.8k
Avg merge
2d 10h
Merged PRs (30d)
162

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ChromeDevTools/chrome-devtools-mcp

All issues in ChromeDevTools/chrome-devtools-mcp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.