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]]
> On Jan 29, 2016, at 10:11 AM, Brian Bolt <brian at mcneilco.com> wrote: > > 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?You could be more specific about which functions you need.> > Thanks, > Brian > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
I am not sure what functions I use in car actually. I am dependent on the drc package which imports "car". The main drc function I use is "drm", along with "LL.4" https://cran.r-project.org/web/packages/drc/index.html <https://cran.r-project.org/web/packages/drc/index.html> Brian Bolt | John McNeil & Co. Inc. | 2223 Avenida de la Playa Suite 204, La Jolla, CA | 707.217.7598> On Jan 29, 2016, at 10:14 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Jan 29, 2016, at 10:11 AM, Brian Bolt <brian at mcneilco.com> wrote: >> >> 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? > > You could be more specific about which functions you need. > > >> >> Thanks, >> Brian >> >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > David Winsemius > Alameda, CA, USA >[[alternative HTML version deleted]]