Repository navigation
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 |
| # via flask-appbuilder | ||
| apsw==3.42.0.1 | ||
| # via shillelagh | ||
| async-timeout==4.0.3 |
There was a problem hiding this comment.
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
mistercrunch
left a comment
There was a problem hiding this comment.
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 <[email protected]> Co-authored-by: Joe Li <[email protected]> (cherry picked from commit 87110eb)
Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Joe Li <[email protected]>
Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Joe Li <[email protected]>
SUMMARY
This PR introduces a substantial performance improvement to the dashboard list page.
We have noticed that
json_metadataandposition_jsoncan 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_columnson the backend, but thats a breaking change. Alsothumbnail_urlusesposition_jsonandjson_metadatato 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
columnsquery parameter, but the SQL selected columns would still use the configureslist_columnsorlist_select_columns. On 4.5.0 I've introduced a new query parameter namedselect_columnsthat works exactly likecolumnsbut will actually on query the requested columns (without never "escaping" thelist_columnsset 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