Could loading time of a large Shiny app be reduced by reading in most of the code externally?

Hello,

You might want to read-up on scoping rules for Shiny apps:
https://shiny.rstudio.com/articles/scoping.html

In essence, the place where you put some variables / code defines whether they need to be loaded for every single session again (i.e. unique) or only once (i.e. global).

You might have to disentangle some of your existing code, but this can really help reducing loading times if implemented correctly and the analysis allows it.

Hope this helps,
PJ

1 Like