-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
feat(native-filters): Defer loading filters data until filter is visible #15120
Conversation
00c2cf7
to
52187b4
Compare
Codecov Report
@@ Coverage Diff @@
## master #15120 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 967 967
Lines 49787 49796 +9
Branches 6358 6363 +5
=======================================
+ Hits 38602 38610 +8
- Misses 10983 10984 +1
Partials 202 202
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
This is super awesome! 🎉
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!
…ble (apache#15120) * feat(native-filters): Defer running query until native filter is in view * Fix default values not displaying
…ble (apache#15120) * feat(native-filters): Defer running query until native filter is in view * Fix default values not displaying
…ble (apache#15120) * feat(native-filters): Defer running query until native filter is in view * Fix default values not displaying
SUMMARY
This PR introduces an optimization in running queries for native filters data. Currently when user opens a dashboard, we run queries for every native filter, regardless if it's hidden in the "Filters out of scope" panel or not. This PR defers running filter queries until the filter is visible.
There are 2 scenarios:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Please notice how many
data
requests there are in Network panelBefore:
https://user-images.githubusercontent.com/15073128/121710250-b64ac700-cad9-11eb-9ed0-df768225989f.mov
After:
Scenario 1:
https://user-images.githubusercontent.com/15073128/121710332-ccf11e00-cad9-11eb-80f2-7bf6f4bb0dbe.mov
Scenario 2:
https://user-images.githubusercontent.com/15073128/121710470-f01bcd80-cad9-11eb-8b8f-1104b18fc611.mov
TESTING INSTRUCTIONS
DASHBOARD_NATIVE_FILTERS
feature flag to TrueADDITIONAL INFORMATION
CC: @junlincc @villebro