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

[Platform] Slow queries are being fetched too often #7624

Closed
andrewc-dev opened this issue Mar 12, 2021 · 0 comments
Closed

[Platform] Slow queries are being fetched too often #7624

andrewc-dev opened this issue Mar 12, 2021 · 0 comments
Assignees
Labels
area/platform Yugabyte Platform area/ui All issues relating to UI/UX
Projects

Comments

@andrewc-dev
Copy link
Contributor

Slow queries are being refetched on window focus. Since the api call is significantly slower than most api calls (at 630ms). Let's remove the refetch on focus that is provided from react-query.

@andrewc-dev andrewc-dev self-assigned this Mar 12, 2021
andrewc-dev pushed a commit that referenced this issue Mar 16, 2021
Summary:
Slow query api call is taking a long time, around 630ms, so we can reduce CPU consumption
by reducing the number of times slow queries are fetched. Remove refetching on window focus
and add stale time to data so we don't fetch if user navigates to a different page then back.

Test Plan:
Open universe overview tab and then navigate to slow query tab, confirm that the slow queries are only fetched once.
Confirm when clicking out of window then clicking into the window does not trigger a refetch of slow_queries.

Reviewers: mjoshi, ssutar, sshevchenko

Reviewed By: sshevchenko

Subscribers: ui

Differential Revision: https://phabricator.dev.yugabyte.com/D10906
@andrewc-dev andrewc-dev added the area/ui All issues relating to UI/UX label Mar 16, 2021
@andrewc-dev andrewc-dev added this to Needs QA/Docs in Platform Mar 16, 2021
@streddy-yb streddy-yb moved this from Needs QA/Docs to Needs Backport in Platform Mar 19, 2021
andrewc-dev pushed a commit that referenced this issue Mar 19, 2021
…ries.

Summary:
Slow query api call is taking a long time, around 630ms, so we can reduce CPU consumption
by reducing the number of times slow queries are fetched. Remove refetching on window focus
and add stale time to data so we don't fetch if user navigates to a different page then back.

Test Plan:
Open universe overview tab and then navigate to slow query tab, confirm that the slow queries are only fetched once.
Confirm when clicking out of window then clicking into the window does not trigger a refetch of slow_queries.

Reviewers: mjoshi, ssutar, sshevchenko

Reviewed By: sshevchenko

Subscribers: ui

Differential Revision: https://phabricator.dev.yugabyte.com/D10906
@streddy-yb streddy-yb moved this from Needs Backport to Needs QA/Docs in Platform Mar 22, 2021
YintongMa pushed a commit to YintongMa/yugabyte-db that referenced this issue May 26, 2021
Summary:
Slow query api call is taking a long time, around 630ms, so we can reduce CPU consumption
by reducing the number of times slow queries are fetched. Remove refetching on window focus
and add stale time to data so we don't fetch if user navigates to a different page then back.

Test Plan:
Open universe overview tab and then navigate to slow query tab, confirm that the slow queries are only fetched once.
Confirm when clicking out of window then clicking into the window does not trigger a refetch of slow_queries.

Reviewers: mjoshi, ssutar, sshevchenko

Reviewed By: sshevchenko

Subscribers: ui

Differential Revision: https://phabricator.dev.yugabyte.com/D10906
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform Yugabyte Platform area/ui All issues relating to UI/UX
Projects
Platform
  
Needs QA/Docs
Development

No branches or pull requests

2 participants