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 2020/03/02 23:44:39 UTC

[GitHub] [incubator-superset] willbarrett commented on issue #9166: Make possible to render all the tabs at once on dom, not when you click on each tab.

willbarrett commented on issue #9166: Make possible to render all the tabs at once on dom, not when you click on each tab.
URL: https://github.com/apache/incubator-superset/issues/9166#issuecomment-593681182
 
 
   Hi @gaurav1999, from your original description it looks like you're trying to scrape the DOM for all of the charts in a dashboard. You're correct, that's different from SQL Lab tabs - @mistercrunch misunderstood.
   
   Let me answer some questions for you:
   
   ### Why isn't the content of all dashboard tabs written to the DOM?
   For each chart on a dashboard, the front-end currently makes an HTTP request for the relevant data after load. Browsers limit concurrent requests to the same domain to 6 at one time. This means that we can, at most, load data for 6 charts concurrently. Writing charts to the DOM for only the current tab is a performance optimization which ensures:
   
   1. All requests are for the tab the user wants to look at right now
   1. Charts which the user does not choose to view are not unnecessarily loaded
   
   Point 2 is especially important for large dashboards accessing data on congested databases - it's quite possible for Superset to overwhelm a back-end store if too many people hit it at once.
   
   ### Why was it built this way?
   I don't have the full history, but I believe this was the easiest way to build the system in the beginning. The project is currently exploring removing some of the bottlenecks by backgrounding queries and leveraging websockets. This should remove the limit of 6 charts loading at once.
   
   ### Recommendation for you
   One way to get around the restriction would be to export the dashboard via either a headed or headless browser using a tool like Selenium - you could code a script to click to open each tab, wait for all the API requests to complete, and then snapshot the DOM. This is likely a slower and more difficult-to-configure snapshot than what you were looking for, but I believe it would work.
   
   Why are you looking to export dashboard data via the web interface? What is your use-case? Understanding this could assist me in helping you meet the need.

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