Using RStudio 1.2.5001 and R 3.6.3 on RedHat 7, I have a Shiny app in an app.R file where the last line is
shinyApp(ui = ui, server = server).
When I click "Profile=>Start Profiling" and then click "Run App" in the RStudio IDE, my app starts up. It takes
- 5 seconds to load and pop open the web browser,
- 23 seconds before all the widgets with the spinners to display via
- 108 seconds before the plotlyOutput completes and the widgets display the plots. I then click Profile=>Stop Profiling and the profile with the flame graph appears.
However, the flame graph only shows data for a timeline of around 30 seconds.
So the bulk of the time I am unable to profile.
I have tried using profvis other ways in the RStudio IDE without success. If I wrap the entire file in
}) I get the error
Error in func(fname, ...) : app.R did not return a shiny.appobj object.
and if I add
runApp(shinyApp(ui = ui, server = server)) at the bottom I get the error
Can't call `runApp()` from within `runApp()`.
What is the recommended way to profile a Shiny app in this situation? Should I try using profvis outside of the RStudio IDE? Is there another way to use profvis? Or is this a known bug or limitation of profvis or of RStudio 1.2.5001?