Skip to content

fix(devtools): enable React rendering analysis and fix large trace parsing#32

Open
f1shy-dev wants to merge 2 commits into
mainfrom
capy/devtools-react-timing
Open

fix(devtools): enable React rendering analysis and fix large trace parsing#32
f1shy-dev wants to merge 2 commits into
mainfrom
capy/devtools-react-timing

Conversation

@f1shy-dev
Copy link
Copy Markdown
Owner

This PR fixes three high-impact gaps surfaced during field testing with React traces: large gz trace parsing caused string overflow errors, summary/capability maps required expensive derived layers, and React render timing lacked classification.

Large trace parsing (src/drivers/devtools.ts)

  • Force streaming parse for all .gz files to avoid "Cannot create a string longer than 0x1fffffe8 characters" errors on traces >32MB.

Lazy summary and capability maps (src/drivers/devtools.ts)

  • Rewrite buildSummary to compute stats directly from traceEvents instead of pulling derived layers.
  • Rewrite buildCapabilityMap to detect capabilities via traceEvents.some instead of materializing dimensions.
  • Fix a test that expected summary to fail when devtools/views.framePipeline errored; summary now only depends on devtools/trace.

React render timing (src/drivers/devtools.ts)

  • Add normalizeUserTimingName to strip zero-width spaces from React component names.
  • Add getRenderMeasureKind to classify measures into component/scheduler/lifecycle/measure based on track.
  • Add kind and trackGroup columns to devtools.views.renderMeasures.
  • Add test validating React updates appear as scheduler kind, Mount/Unmount as lifecycle, and other Components tracks as component kind.
  • Filter devtools.views.renderComponentHotspots and devtools.views.interactionRenders to only include rows with componentName.

Type fix (src/drivers/nextjs-bundle.ts)

  • Add explicit type annotation for args parameter in namespace route handler.

Open AGE-012 AGE-012

…gz traces and optimizing lazy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@f1shy-dev f1shy-dev added the capy Generated by capy.ai label Jun 3, 2026 — with Capy AI
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant