jeroen / mongolite

Fast and Simple MongoDB Client for R
https://jeroen.github.io/mongolite/
284 stars 64 forks source link

High memory consumption after mongo$find #218

Open marco-wsf opened 3 years ago

marco-wsf commented 3 years ago

We're using MongoLite to pull ~400mb worth of data from a collection.

We've noticed that while the resulting dataframe is quite small ~93mb, the actual memory consumption of the rsession process (seen from ps aux | grep rsession) right after the "find", spikes to over 2gb.

Even removing the mongolite object and running a gc() doesn't help, as the memory footprint of the process stays around 2gb.

Running mem_used() gives back a 220mb output.

Would you have any idea of what might holding the memory and how to free it up?

Thanks, Marco

jeroen commented 3 years ago

See https://github.com/jeroen/mongolite/issues/217