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

fix: decrease dashboard request response load size #1596

Merged
merged 15 commits into from
Mar 4, 2021

Conversation

jenniferarnesen
Copy link
Collaborator

@jenniferarnesen jenniferarnesen commented Mar 3, 2021

Request load improvements:

  • Limit the request that fetches all dashboards (for the dashboard bar) to only getting id, displayName, favorite~rename(starred). This reduces the response size from 3.9kb to 1.1kb on the SL database. Feels like a drop in the bucket, but that will have a bigger impact on instances with a lot of dashboards
  • Create separate requests getting a single dashboard for viewing and editing. In view, there are several fields that aren't used. In edit, we need all the fields if we are going to PUT changes.

Refactor:

  • move getCustomDashboards to own module file
  • split up api requests for dashboards into separate files

@jenniferarnesen jenniferarnesen marked this pull request as draft March 3, 2021 16:16
@jenniferarnesen jenniferarnesen changed the title fix: dashboard request load performance fix: decrease dashboard request response load size Mar 3, 2021
@jenniferarnesen jenniferarnesen marked this pull request as ready for review March 4, 2021 07:40
Copy link
Collaborator

@janhenrikoverland janhenrikoverland left a comment

Choose a reason for hiding this comment

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

LGTM

@jenniferarnesen jenniferarnesen enabled auto-merge (squash) March 4, 2021 12:54
@jenniferarnesen jenniferarnesen merged commit 9ac201f into master Mar 4, 2021
@jenniferarnesen jenniferarnesen deleted the fix/dashboard-query-performance branch March 4, 2021 12:58
dhis2-bot added a commit that referenced this pull request Mar 4, 2021
## [31.13.4](v31.13.3...v31.13.4) (2021-03-04)

### Bug Fixes

* decrease dashboard request response load size ([#1596](#1596)) ([9ac201f](9ac201f))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 31.13.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants