1 min read

readr::read_csv and R notebook

I am trying to do everything in tidyverse, well, everthing data related. My default is to write codes in R notebooks. Then I am bothered by the slow loading of data from csv. I tried workaround like save data as RDA or even feather, so that I don’t have to deal with slowness every time.

Yesterday, I tried to find out more, and to my surprise, the read::read_csv is even slower than base::read.csv, let alone the data.table::fread

I spent hours to figure out why, until I found the post answered by @jimhester. It is clear in hindsight that interaction between the progress bar and the notebook kills the efficiency. Also the progress bar will be part of the html output chunk, which is not needed most cases.

The default should be disabling progress bar in Notebook environment, and Jim logged this as an issue in GitHub, and hopefully we will see it fixed soon.