This PR removes the now outdated "initial page load pulse" from useBusyIndicators(). This logic was added well before we had proper progress reporting on the initial render of outputs, and was in mostly inspired by the lack of progress reporting on initial render, so it's no longer serving as much utility.
By removing this logic, it is technically possible for the server to be busy without any indication. Below is one such example with slow running session initialization code and no outputs. It seems fair to say, however, that Shiny should be reporting a busy status when the server function is executing (i.e., it shouldn't be the responsibility of the busy indicator logic to cover these scenarios).
The more unfortunate thing about removing this logic is what can possibly happen when someone chooses useBusyIndicators(spinners = FALSE, pulse = TRUE). In that case, if there is slow running startup code, you won't get any busy indication (for similar reasons to above), even when there are outputs on the page:
library(shiny)
ui <- fluidPage(
useBusyIndicators(spinners = FALSE),
actionButton("btn", "Press"),
plotOutput("p")
)
server <- function(input, output, session) {
Sys.sleep(3) # Won't get busy indication here
output$p <- renderPlot({
input$btn
Sys.sleep(3) # This will get busy indication, since the server reports busy status
plot(1:10)
})
}
shinyApp(ui, server)
Closes #4056
This PR removes the now outdated "initial page load pulse" from
useBusyIndicators()
. This logic was added well before we had proper progress reporting on the initial render of outputs, and was in mostly inspired by the lack of progress reporting on initial render, so it's no longer serving as much utility.By removing this logic, it is technically possible for the server to be busy without any indication. Below is one such example with slow running session initialization code and no outputs. It seems fair to say, however, that Shiny should be reporting a busy status when the server function is executing (i.e., it shouldn't be the responsibility of the busy indicator logic to cover these scenarios).
The more unfortunate thing about removing this logic is what can possibly happen when someone chooses
useBusyIndicators(spinners = FALSE, pulse = TRUE)
. In that case, if there is slow running startup code, you won't get any busy indication (for similar reasons to above), even when there are outputs on the page: