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(dashboard): Send chart requests before native filter requests #19077

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Mar 9, 2022

SUMMARY

For performance reasons, when a dashboard loads, native filters requests are delayed until chart requests were triggered. However, that's not the case when user clicks "Refresh dashboard" button. This PR fixes that issue.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

In the Network panel on the right you can see the requests sent after clicking "Refresh dashboard". The ones that just say data are native filter requests. The other ones are chart requests. The goal was to make sure that all native filter requests were made after chart requests

Before:
image

After:
image

TESTING INSTRUCTIONS

  1. Create a dashboard with multiple charts and native filters
  2. Open Chrome dev tools network tab
  3. Click "Refresh dashboard"
  4. Make sure that all native filter requests were made after chart requests

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

https://app.shortcut.com/preset/story/38199/refresh-dashboard-performance-issue-filter-requests-blocking-chart-requests

@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #19077 (4431e62) into master (79a7a5d) will increase coverage by 0.00%.
The diff coverage is 38.46%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #19077   +/-   ##
=======================================
  Coverage   66.51%   66.51%           
=======================================
  Files        1643     1643           
  Lines       63462    63474   +12     
  Branches     6449     6451    +2     
=======================================
+ Hits        42210    42218    +8     
- Misses      19582    19586    +4     
  Partials     1670     1670           
Flag Coverage Δ
javascript 51.24% <38.46%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/dashboard/actions/hydrate.js 2.08% <ø> (ø)
...-frontend/src/dashboard/reducers/dashboardState.js 73.33% <0.00%> (-3.42%) ⬇️
...t-frontend/src/dashboard/actions/dashboardState.js 36.06% <28.57%> (+0.11%) ⬆️
...veFilters/FilterBar/FilterControls/FilterValue.tsx 60.43% <47.05%> (+3.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79a7a5d...4431e62. Read the comment docs.

@geido
Copy link
Member

geido commented Mar 10, 2022

/testenv up

@github-actions
Copy link
Contributor

@geido Ephemeral environment spinning up at http://54.188.132.226:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

@kgabryje kgabryje merged commit b8091e3 into apache:master Mar 10, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

villebro pushed a commit that referenced this pull request Apr 3, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels lts-v1 size/M 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants