Updating .rds datasets significantly decreased Shiny performance

Environment:

  • Platform: shinyapps.io

  • Plan type: Pro

  • Instance size: large, xlarge

Problem: After updating our .rds dataset files (adding rows only, no structural changes), our published Shiny app takes almost 1 minute to load.

We have already tried:

  • Checked application logs via rsconnect::showLogs() and the dashboard — no errors found

  • Increased the instance size — no change in load time

  • Adjusted advanced settings (Startup Timeout, Worker settings) — no change in load time

Questions:

  • What could cause slow load times on shinyapps.io after a dataset size increase, when there are no errors in the logs and instance/settings changes have no effect?

  • Are there any server-side diagnostics or additional steps we can take to investigate?

How big is the dataset? Where is the file read in (global.R, app.R etc.)?

One way you might be able to improve it is to store the data elsewhere and only load it once the app has started instead of during startup.

The .rds datasets are ~2700 kb (+ a few extra with text for the UI which each are <100 kb). And they are read in global.R.

Hmm that's not huge, but how many datasets are there? Do you process the data somehow after reading it in (like fitting a model)? How long does it take to open if you restart R and run it locally?