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 2019/08/27 17:28:58 UTC

[GitHub] [incubator-superset] etr2460 commented on issue #7816: Add cache_key_wrapper to Jinja template processor

etr2460 commented on issue #7816: Add cache_key_wrapper to Jinja template processor
URL: https://github.com/apache/incubator-superset/pull/7816#issuecomment-525403232
 
 
   @villebro: We’re running into an issue where charts and dashboards are significantly slower after your change. This seems to be because we’re “compiling” the query every time before checking the cache for it, which results in several requests to our Presto/Hive backend (show partitions, show columns, etc.) to resolve the templates. When we load a dashboard with 20 charts, all with a use of latest partition, it significantly slows down and reduces the usefulness of caching.
   
   I had a couple possible solutions to this:
   1. Only compile the jinja templates that relate to the current user. Your fix was aimed at fixing uses of current_username, maybe we can just special case this here?
   2. Cache the results of the queries that compile the jinja templates. That way we wouldn’t need to repeatedly ping Presto/Hive for the partitions/columns in the table.
   
   What do you think? 
   cc @graceguo-supercat @michellethomas 

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org