When printing in the Rstudio console a relatively large list, Rstudio becomes unresponsive for a long time while printing the list in the console. Afterwards, Rstudio feels much slower in general.
So, with the example below, the Rstudio console takes ~ 25 seconds to become responsive again. If I run the exact same code in a terminal in R, the console takes ~ 2 seconds to become responsive.
It looks like a bug in Rstudio, right?
library(dplyr)
create_vector <- function(N) {
1:N %>%
purrr::map(~
{c(runif(N, min = 0, max = 100),
runif(N, min = 0, max = 100))
})
}
VECTOR = create_vector(N = 500)
# These two first
time1 = Sys.time()
VECTOR
# When the console is responsive again, these two
time2 = Sys.time()
time2 - time1
# In R console in a terminal: 2.2 secs
# In Rstudio console: 25 secs
This is in Ubuntu 20.04 with the Rstudio preview 1.4.1707