-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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: dashboard performance #28609
fix: dashboard performance #28609
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #28609 +/- ##
==========================================
+ Coverage 60.48% 70.29% +9.81%
==========================================
Files 1931 1949 +18
Lines 76236 77635 +1399
Branches 8568 8738 +170
==========================================
+ Hits 46114 54577 +8463
+ Misses 28017 20930 -7087
- Partials 2105 2128 +23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
49bcc71
to
452e886
Compare
452e886
to
0ebfb38
Compare
/testenv up |
@eschutho Ephemeral environment spinning up at http://35.95.35.109:8080. Credentials are |
@@ -15,8 +15,6 @@ apispec[yaml]==6.3.0 | |||
# via flask-appbuilder | |||
apsw==3.42.0.1 | |||
# via shillelagh | |||
async-timeout==4.0.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noting that this particular pinned dep has been flickering, meaning pip-compile-multi
isn't as deterministic as I'd like for it to be, for reasons I don't really understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. It's nice to be able to specify the columns needed for the list view
9b86ca1
to
f9d2451
Compare
f9d2451
to
9b86ca1
Compare
Ephemeral environment shutdown and build artifacts deleted. |
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com> Co-authored-by: Joe Li <joe@preset.io>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com> Co-authored-by: Joe Li <joe@preset.io> (cherry picked from commit 87110eb)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com> Co-authored-by: Joe Li <joe@preset.io>
SUMMARY
This PR introduces a substantial performance improvement to the dashboard list page.
We have noticed that
json_metadata
andposition_json
can contain huge payloads on dashboards that contain a large amount of charts (hundreds). This can heavily impact performance.The easier path would be to just remove those columns from
list_columns
on the backend, but thats a breaking change. Alsothumbnail_url
usesposition_json
andjson_metadata
to compute the MD5 digest. So currently it's not possible to improve the REST API performance itself by default.it's possible on FAB to just request the columns we want using the
columns
query parameter, but the SQL selected columns would still use the configureslist_columns
orlist_select_columns
. On 4.5.0 I've introduced a new query parameter namedselect_columns
that works exactly likecolumns
but will actually on query the requested columns (without never "escaping" thelist_columns
set configured on the backend, for security reasons).Using the example dashboards:
Requesting just the columns we need defined on this PR, avg API response is ~16ms
Using the API by default (backend defined columns), avg API response is ~120ms
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION