Rstudio console is very slow printing large lists

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

In case someone is interested in following this up, it's being taken cared of by the Rstudio folks: Rstudio console is very slow printing large lists · Issue #9376 · rstudio/rstudio · GitHub

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.