Improve profiling output for repeated component names

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

@piotrski is already working on this.

Since Apr 4, 2026.

  • #55 by @piotrski — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
react, typescript

Research direction

Trace the profiling output paths for profile slow and profile rerenders, starting with the React DevTools inspection payloads that provide source metadata. Done means grouping only entries with matching source identity, keeping different or metadata-free entries separate, and retaining parent-path context for each grouped instance.

Written by the indexing model from the issue text.

Description

enhancement

Summary

Profiling views like profile slow and component-level reporting can be hard to interpret when the results include multiple repeated rows with the same display name, especially generic names such as Context.Provider.

Today the output is a flat list of component instances, so repeated names do not provide enough context to tell whether they are the same component reused in many places or different components that happen to share the same display name.

Problem

When profiling output contains repeated names:

  • it is difficult to tell which entries are actually related
  • Context.Provider-style rows are especially noisy because the name alone is not actionable
  • users often need extra follow-up inspection to understand which subtree or implementation each row refers to

Suggested direction

Improve profiling output by grouping repeated entries only when they represent the same component implementation, not just the same display name.

A reasonable approach would be:

  • preserve source metadata from React DevTools inspection payloads
  • normalize a grouping key from source identity, such as fileName + line/column
  • group repeated results in profile slow and profile rerenders only when that source identity matches
  • include short hierarchy/path context for each grouped instance, so the result remains actionable
  • keep components with missing source metadata as standalone rows rather than grouping heuristically by name

Expected behavior

  • same display name + same implementation/source => grouped
  • same display name + different implementation/source => separate entries
  • missing source metadata => no grouping
  • per-instance output should still show enough parent-path context to identify where each instance lives

Why this matters

This should make profiling output easier to act on without requiring extra manual inspection, especially for apps with many providers, wrappers, or repeated higher-order components.

Dominant language
TypeScript
Stars
251
Forks
13
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 callstackincubator/agent-react-devtools

All issues in callstackincubator/agent-react-devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.