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

refactor: re-arrange dashboard page js bundles #16285

Merged

Conversation

graceguo-supercat
Copy link

@graceguo-supercat graceguo-supercat commented Aug 17, 2021

SUMMARY

I am trying to rearrange existing bundles needed by the dashboard page, make spa.js execute and route to the dashboard page quicker, so that it can start to fetch dashboard metadata earlier.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2021-08-16 at 12 18 30 AM

control without cache

After:
Screen Shot 2021-08-16 at 12 14 15 PM

test no cache

TESTING INSTRUCTIONS

CI and manual test

Note:
The perf improvement is hard to estimate, because I only run a few times, with same dashboard, from my own computer. I feel it might be highly impacted by my computer's performance. For example if i was in zoom meeting the page load will be slower 😂
Since the change is relatively small, I hope could deploy to airbnb production environment and collect some real data. If thing didn't work well, i am ok to roll it back.

cc @nytai and @suddjian I saw you have a lot of work on spa and recent dashboard refactor, please take a look at this PR.

also cc @ktmud and @etr2460

@@ -21,7 +21,7 @@
with development version #}
<!-- Bundle js {{ filename }} START -->
{% for entry in js_manifest(filename) %}
<script src="{{ entry }}"></script>
<script src="{{ entry }}" async></script>
Copy link
Author

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Aug 17, 2021

Codecov Report

Merging #16285 (8af513e) into master (be7065f) will decrease coverage by 0.20%.
The diff coverage is 0.00%.

❗ Current head 8af513e differs from pull request most recent head 407df2d. Consider uploading reports for the commit 407df2d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16285      +/-   ##
==========================================
- Coverage   76.49%   76.28%   -0.21%     
==========================================
  Files         997      997              
  Lines       53246    53244       -2     
  Branches     6777     6777              
==========================================
- Hits        40731    40619     -112     
- Misses      12285    12395     +110     
  Partials      230      230              
Flag Coverage Δ
hive 81.31% <ø> (?)
mysql ?
postgres ?
python 81.31% <ø> (-0.41%) ⬇️
sqlite ?

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

Impacted Files Coverage Δ
...rontend/src/dashboard/containers/DashboardPage.tsx 0.00% <0.00%> (ø)
superset-frontend/src/views/App.tsx 0.00% <ø> (ø)
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/views/database/views.py 61.17% <0.00%> (-28.30%) ⬇️
superset/databases/commands/update.py 85.71% <0.00%> (-8.17%) ⬇️
superset/sql_validators/base.py 93.33% <0.00%> (-6.67%) ⬇️
superset/databases/commands/create.py 82.35% <0.00%> (-5.89%) ⬇️
superset/views/database/forms.py 83.33% <0.00%> (-5.56%) ⬇️
superset/db_engine_specs/sqlite.py 91.89% <0.00%> (-5.41%) ⬇️
superset/connectors/sqla/utils.py 88.23% <0.00%> (-3.93%) ⬇️
... and 20 more

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 be7065f...407df2d. Read the comment docs.

@graceguo-supercat graceguo-supercat changed the title refactor: rearrange dashboard page js bundles refactor: re-arrange dashboard page js bundles Aug 17, 2021
@graceguo-supercat graceguo-supercat requested review from nytai and suddjian and removed request for nytai August 17, 2021 14:50
@suddjian
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

Copy link
Member

@suddjian suddjian left a comment

Choose a reason for hiding this comment

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

nice!

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

Seems like an easy win 🎉

@graceguo-supercat graceguo-supercat merged commit b87e0b3 into apache:master Aug 17, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@ktmud
Copy link
Member

ktmud commented Aug 19, 2021

image

@graceguo-supercat VizType filter values are now missing on the Charts page. Could this be related?

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants