A similar issue has already been reported (Inline notebook display is slow when loading data). In my case, the difference in speed always occurs when showing in screen any large object, e.g. a nested tibble. I don't know how to add a reprex for this case, at least not a good one. To see the problem, create an RMArkdown or Rnotebook with this chunk of code
library(tictoc)
library(tidyverse)
tic("a plot")
a <- tibble (A = rep(LETTERS, 1e6))
a %>%
rownames_to_column("var1") %>%
group_by(A) %>%
mutate(var2 = n()) %>%
group_by(A) %>%
nest() %>%
mutate(plot = map(data, ~ ggplot(.x, aes(x = var1, y = var2)) + geom_col()))
toc()
If I set up the option as Chunk Output in Console
the operation takes 5.217 secs.
If I set up the option as Chunk Output Inline
the operation takes 211.877 secs.