Skip to content

ref(replays): Refactor breadcrumb accessors to be memoized and central in ReplayReader #48745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2023

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented May 8, 2023

Moving the breadcrumb accessors into ReplayReader.

There are a few spots that were asking for all the raw breadcrumbs, and would then filter them down depending on the view. Well, it turns out that we probably don't need to re-filter everything each time those different views are rendered; especially since some of those views are rendered at the same time (timeline, breadcrumbs, +main section).

So this centralizes the filters, and adds memoize()

There's some followups I'm thinking about now too:

  • Use ReplaySpan and ReplayCrumb types in all places. Make them both have subtypes for the different payload flavors (network spans, error crumbs, nav crumbs, etc).
  • Remove calls to getPrevReplayEvent from static/app/views/replays/detail/breadcrumbs/index.tsx, we can do that stuff in css instead!

Related to #47991

@ryan953 ryan953 requested a review from a team as a code owner May 8, 2023 22:31
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 8, 2023
@ryan953 ryan953 requested review from billyvg and eliashussary May 8, 2023 22:33
Copy link
Contributor

@eliashussary eliashussary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@ryan953 ryan953 merged commit d2578df into master May 9, 2023
@ryan953 ryan953 deleted the ryan953/ref-replay-breadcrumb-accessors branch May 9, 2023 18:34
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
2 participants