villebro commented on issue #14421: URL: https://github.com/apache/superset/issues/14421#issuecomment-831029351
> 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 While the client only sends one http request from the client to the backend for filter box select filters, they are all broken down into multiple chart data requests by the backend to be satisfied either from the analytical database or cache. This means that a filter box data request with multiple selects that is not cached might take relatively longer to resolve, as it will have to complete all queries serially before it can return results for the queries. So time saved by limiting number of client side requests can result in major delays caused by serial resolution of individual queries in the filter box. If limiting the number of client requests is seen as a major concern, we could introduce functionality that groups together all chart data requests originating from non-legacy plugins into one request (the `/api/v1/chart/data` endpoint supports requesting data for multiple queries in one request). However, this would likely introduce other bottlenecks, especially in cases where data is not cached. To address the limitations the browser imposes on concurrent API requests, the Global Async Query (GAQ) framework (#9190), which is nearing completion, should help address some of the bottlenecks caused by multiple chart data requests. It also introduces other benefits that will likely outweigh both the benefits achieved by grouping chart data queries together, such as query deduplication and not being limited by webserver timeout restrictions for long running queries. Therefore, I'd recommend investing in completion of GAQ rather than grouping chart data requests together. > 2. in filter component version: each filter field is a separated query, and they all get triggered before dashboard start to load chart. See in above screenshot, filter components sends `data` queries first. We're working on prioritizing chart requests, so that they will trigger before native filter data requests. See #14443 for the PR that implements this. This should make that actual charts on the dashboard load up quicker than before, as the filter box requests are carried out in parallel with regular chart data requests. -- 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]
