subugoe / hoad

Deprecated: Please check https://github.com/subugoe/hoaddash
https://github.com/subugoe/hoaddash
GNU Affero General Public License v3.0
15 stars 4 forks source link

speed up shiny load time #187

Open maxheld83 opened 4 years ago

maxheld83 commented 4 years ago

currently, despite having implemented pre-rendered chunks as per #147 (limited in the current design), the load time for the shiny app is pretty slow. That's pretty sad in our case, in particular, because there's no good reason for it. There is a default view that's basically static before any user inputs.

Currently the loading is weighted down because many of the operations are quite expensive (and could be done earlier or globally for all users). An overhaul of the design should help here, perhaps more than #147. General guidance is here: https://rstudio.com/resources/rstudioconf-2018/make-shiny-fast-by-doing-as-little-work-as-possible/

Alternatively, if properly factoring out the shiny app doesn't make it (load) fast enough, we might migrate entirely to a design where:

njahn82 commented 4 years ago

Would switching to shinydashboard help?

maxheld83 commented 4 years ago

it might, because then we don't have to render to HTML and instantiate the shiny server objects, though pre-rendering #147 should cut down most of this extra load time.

My current plan is to keep factoring out stuff, so that whatever the final frontend (shinydashboard, flexdashboard, or even just crosstalk) have to do as little work as possible.

When everything's factored out, it should also be pretty easy to quickly try out flexdashboard or shinydashboard.

I've really come to like your flexdashboard approach, because it would also allow us to keep a static version of the dashboard, that we can always present without a shiny runtime (which we may not always have, or which may get too expensive/slow, ...).