Stop R package build & reload from backing up and resuming R session

Viewed 1693

I am writing an R package in Rstudio on Windows 10. Every time I reload the package, a note comes up: "Backing up R session" and then "Resuming R session". This takes a bit of time (about 8 or 9 seconds out of a total package build time of 14 seconds), and it would be nice if it could go a bit faster. When I reload the package, I am most of the time fine with not backing up the R session and just starting with a clean session.

Is there any way I can stop R from backing up the session or resuming the old session? It still seems to take some time to complete the process even if I run rm(list=ls()) before clicking "Build & Reload".

1 Answers

FWIW, that's not a good solution for me. My problem is that if I forget to erase a large object in memory (an output of my code) before rebuilding the package, that object is backed up, taking several minutes, before my R session finally comes back to life.

https://github.com/rstudio/rstudio/issues/7287

Related