R6 icon indicating copy to clipboard operation
R6 copied to clipboard

Save R6 object

Open MathieuDepetris opened this issue 2 years ago • 2 comments

Hi all, I am developing an R package called t3 (https://github.com/OB7-IRD/t3/tree/development) using R6 classes. So far everything works fine but I have some troubles when I tried to save a R6 object after data manipulation and application of several methods. Saving and loading time is very long, even if at the end the output file generated is approximately 100mo. I tried to investigate that and make some kind of profiling and used different saving methods, but I find some post on the internet that makes me wonder is the problem came from me (for example here Serializing R6 classes? · Issue #157 · r-lib/R6 (github.com)). Do there any specifications related to the saving process of R6 object under R ? Thank for help.

MathieuDepetris avatar Mar 24 '22 14:03 MathieuDepetris

@MathieuDepetris I've encountered a similar problem before, specifically an dramatic increase in memory consumption on load. I ended up putting pickleR together to solve my issue. Not sure if it will sort your issue. Should be noted that it currently does not support the 'pickling' of S4 objects if you have any.

d-sharpe avatar Jul 07 '22 10:07 d-sharpe

@d-sharpe, thank you very much for your advice

MathieuDepetris avatar Jul 07 '22 11:07 MathieuDepetris