Skip to content
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

ref(perf): Move out the span transactions table #69771

Merged
merged 10 commits into from May 8, 2024

Conversation

gggritso
Copy link
Member

@gggritso gggritso commented Apr 26, 2024

This one's gross! In short, we had a component called the SpanTransactionsTable. It was a transactions table with some conditional logic, to render different columns and fetch different data depending on what module was using it.

The problem? The only module using it is the database module. So, I'm dumping this "dynamic" table, and replacing it with a normal table, the kind we have all over the place. This will make it easier to consolidate the code, and remove a few rarely-used utils like extractRoute.

I'm also removing some cruft like the competing endpoint and transaction parameters that we don't use anymore, lifting up the data loading state, etc.

  • Move transactions table into the module
  • Lift up data fetching state
  • Static column order
  • Remove redundant wrapper
  • Simplify routing
  • Move out table cell renderer
  • Export testable component
  • Sorting

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 26, 2024
Copy link

codecov bot commented Apr 26, 2024

Bundle Report

Changes will increase total bundle size by 4.67kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 26.36MB 4.67kB ⬆️

@gggritso gggritso marked this pull request as ready for review May 6, 2024 22:11
@gggritso gggritso requested a review from a team as a code owner May 6, 2024 22:11
Copy link
Contributor

@0Calories 0Calories left a comment

Choose a reason for hiding this comment

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

Nice refactor! :shipit:

field: (typeof SORTABLE_FIELDS)[number];
};

export function isAValidSort(sort: Sort): sort is ValidSort {
Copy link
Contributor

Choose a reason for hiding this comment

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

neat

sorts: [sort],
limit: TRANSACTIONS_TABLE_ROW_COUNT,
cursor,
referrer: 'api.starfish.span-transaction-metrics',
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably rename this referrer eventually

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, definitely! Cleaning up referrers everywhere is on my list

@gggritso gggritso merged commit f49e7b2 into master May 8, 2024
42 checks passed
@gggritso gggritso deleted the ref/perf/move-span-transactions-table branch May 8, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants