I'm finding when running read_tsv on character vectors in a loop, the memory usage will keep growing. I don't really have much experience with diagnosing memory issues so here I'm just relying on gc()'s report of memory usage.
dummy <- rep("a\tb\tc\t1\t2\t3\n", 1000000)
for (i in 1:5) {
readr::read_tsv(dummy, col_names = FALSE)
print(gc())
}
On my machine (Ubuntu) this grows the memory used by 5mb each run, whereas read.table does not.
for (i in 1:5) {
read.table(textConnection(dummy), header = FALSE, sep = "\t")
print(gc())
}
I'm finding when running
read_tsvon character vectors in a loop, the memory usage will keep growing. I don't really have much experience with diagnosing memory issues so here I'm just relying on gc()'s report of memory usage.On my machine (Ubuntu) this grows the memory used by 5mb each run, whereas
read.tabledoes not.