Inline notebook display is slow when loading data

readr
rmarkdown

#1

Greetings all! I have read for a bit, but have finally decided to join the conversation (i.e. ask a question).

I have finally been updated to a new version of RStudio through IT and now have access to notebooks and inline chunk output. I am currently running some scripts which load .csv files (~100 - 1,300 MB in size) using readr:read_csv(). It appears that running this action in a notebook with the inline optioned turned on is significantly slower than running from either a script, or with the inline option turned off.

The data is located on a network drive if that makes a difference. I witnessed this issue in both Rstudio 1.1.383 and 1.1.423.

Ultimately I would like to either avoid this slowdown while still having access to the inline chunk feature or to simply turn off the inline output for chunks which are loading in data.

Is there anyway to do this?

Greg


#2

I am speculating, but the notebook might be slower due to the progress bar used in readr. You might try setting progress = FALSE in the call to readr::read_csv().


#3

Wow, seems to have done the trick! Can’t believe I didn’t try that. Progress bar is nice, but definitely not necessary. Thanks for the help!


#4

Great, I opened https://github.com/tidyverse/readr/issues/793, so this could be potentially automatically disabled by readr in the future when running in notebook chunks.