graceguo-supercat opened a new issue #14421:
URL: https://github.com/apache/superset/issues/14421


   I compared the 2 dashboard with same set of of charts, one using filter_box 
and the other used filter components. I can tell the dashboard using filter 
component loads much slower than filter_box version.
   
   #### How to reproduce the bug
   
   1. Let's use World Bank's Data dashboard as an example.
   2. Save World Bank's Data dashboard as a new copy, in the new dashboard, 
remove filter_box, and add 2 filter components to the dashboard.
   3. Load each dashboard, and compare their requests from browser's dev 
console:
   
   #### Screenshots
   
   
   <img width="1604" alt="Screen Shot 2021-04-26 at 1 00 42 AM" 
src="https://user-images.githubusercontent.com/27990562/116633512-8de28100-a90e-11eb-9536-b92214c6d0bd.png";>
   
   1. in filter_box version, 1 filter box can have multiple filter field, and 
Superset dashboard only send 1 http request can get all the options list for 
each filter field
   2. in filter component version: each filter field is a separated query, and 
they all get triggered before dashboard start to load chart. 
   Dashboard users may not need to change filter values for every time they 
load dashboard, and there might be some scoped-filters that are not applicable 
to the charts currently visible, but users have to wait all the filter 
components to be finished before the charts to load.  
   
   3. Another important case is Time related filter types. In filter_box we 
have time-range, time-column and time-granularity in a single filter_box, for 
filter components it's 3 different filter-type. And once added into dashboard, 
it generates 3 extra different query requests.
   
   This is a simple example and performance might not looks really bad. During 
my test with airbnb dashboard, which has ~10 filter fields (or even more), 
dashboard load really slow and chart keep spinning a very long time.
   
   
   ### Environment
   
   latest master.
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to