You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/04/22 23:31:44 UTC
[GitHub] [superset] ktmud commented on a change in pull request #14306: fix(dashboard): Add caching for dashboard datasets
ktmud commented on a change in pull request #14306:
URL: https://github.com/apache/superset/pull/14306#discussion_r618816964
##########
File path: superset/dashboards/dao.py
##########
@@ -49,13 +49,7 @@ def get_by_id_or_slug(id_or_slug: str) -> Dashboard:
@staticmethod
def get_datasets_for_dashboard(id_or_slug: str) -> List[Any]:
dashboard = DashboardDAO.get_by_id_or_slug(id_or_slug)
- datasource_slices = core.indexed(dashboard.slices, "datasource")
- data = [
- datasource.data_for_slices(slices)
- for datasource, slices in datasource_slices.items()
- if datasource
- ]
- return data
+ return dashboard.datasets_trimmed_for_slices()
@staticmethod
def get_charts_for_dashboard(id_or_slug: str) -> List[Slice]:
Review comment:
Is this API also slow for large dashboard?
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org