[R] Reducing of car package when loading
Brian Bolt
brian at mcneilco.com
Fri Jan 29 19:11:53 CET 2016
I have a non-CRAN package that has a large number of dependencies and as such, the memory footprint from loading my package in R is becoming larger. I use Rapache often to pre-load my package and provide web services for my code, so the consistent memory footprint is hurting other processes on the machine.
I have created an R docker container and when I start R, the memory footprint is 27.89MB, after loading the car package, the memory footprint shoots up to 131.4MB. A difference of 103.51MB. For comparison, loading ggplot2 only gives a difference of 9.32MB.
Is there something I can do, without removing dependencies, that could relieve some of my memory footprint? To be clear, I am not just asking about the car package but reducing memory dependence in general. Can I force the R package loader to only load functions from packages that I am dependent on? Is there a way to not load all of the datasets?
Thanks,
Brian
[[alternative HTML version deleted]]
More information about the R-help
mailing list