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

perf(ui): Prevent unnecessary endpoint requests #28924

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

NisanthanNanthakumar
Copy link
Contributor

Objective:

Identify and remove duplicate API queries by our frontend client for our slowest pages. One endpoint that gets called multiple times unnecessarily is /api/0/projects/{organization_slug}/{project_slug}/. P95 for this query is 334.00ms. This is the low hanging fruit for page speed optimization.

https://sentry.io/organizations/sentry/performance/summary/?project=1&query=transaction.duration%3A%3C15m+transaction%3A%2Fapi%2F0%2Fprojects%2F%7Borganization_slug%7D%2F%7Bproject_slug%7D%2F+event.type%3Atransaction+http.method%3AGET&showTransactions=slow&statsPeriod=24h&transaction=%2Fapi%2F0%2Fprojects%2F%7Borganization_slug%7D%2F%7Bproject_slug%7D%2F&unselectedSeries=p100%28%29

@NisanthanNanthakumar NisanthanNanthakumar requested a review from a team September 28, 2021 23:11
Copy link
Member

@leeandher leeandher left a comment

Choose a reason for hiding this comment

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

looks good to me 👍

@@ -39,6 +39,7 @@ type Props = {
projectId: string;
orgId: string;
children: ((props: ChildFuncProps) => React.ReactNode) | React.ReactNode;
loadingProjects: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this boolean more explanatory (shouldLoadProjects, isLoadingProjects, etc.)

Copy link
Member

Choose a reason for hiding this comment

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

Nevermind turns out this is a built-in thing with the Projects HOC, my bad

@NisanthanNanthakumar NisanthanNanthakumar merged commit 493559e into master Sep 30, 2021
@NisanthanNanthakumar NisanthanNanthakumar deleted the API-2162 branch September 30, 2021 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants