Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-08 Thread Andreas Kersting
Hi, For (hopefully) full reproducibility: docker run rocker/tidyverse:4.0.5 Rscript -e 'devtools::install_github("akersting/dumpTest", INSTALL_opts = "--with-keep.source"); library(dumpTest); for (i in 1:100) {print(i); print(system.time(f()))}' Regards, Andreas 2021-04-07 17:09 GMT+02:00 "A

Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-08 Thread luke-tierney
I see that now also. Not sure yet what is going on. One work-around that may work for you is to create a fresh crash dump in a .onLoad function; somehting like crash_dumps <- NULL .onLoad <- function(...) crash_dumps <<- new.env() Best, luke On Wed, 7 Apr 2021, Andreas Kersting wrote: Hi Di

Re: [Rd] [External] memory consumption of nested (un)serialize of sys.frames()

2021-04-08 Thread luke-tierney
Looks like this is an unavoidable interaction between the way source references and lazy loading are implemented. The link back to the crash_dumps environment comes though source references on an unevaluated argument promise. Creating a fresh environment is .onLoad() avoids this and is probably yo