When saving and loading R6 objects (via serialization) the objects consume more greater amounts of memory after load. It appears that the unserialization process creates copies of function bodies. The effect is large for nested and recursive objects. #157
Added an instantiate method to the R6 class generator, (essentially the new() method without calling to initialize) allowing creation of an uninitialized 'blank' object.
Added default public methods of get_state and set_state which return and accept a nested list of field values representing the 'state' of the object. Can be overridden by user supplied public get_state and set_state methods.
Added internal binding to public interface with instance uuid. Used in conjunction with get/set_state to distinguish between to instances of same class
I appreciate the intent, but these changes are much more invasive than I'm willing to take for the problem it is intended to solve. (Side note: examples and some documentation would be very helpful for reviewers.)
When saving and loading R6 objects (via serialization) the objects consume more greater amounts of memory after load. It appears that the unserialization process creates copies of function bodies. The effect is large for nested and recursive objects. #157
Added an instantiate method to the R6 class generator, (essentially the new() method without calling to initialize) allowing creation of an uninitialized 'blank' object.
Added default public methods of get_state and set_state which return and accept a nested list of field values representing the 'state' of the object. Can be overridden by user supplied public get_state and set_state methods.
Added internal binding to public interface with instance uuid. Used in conjunction with get/set_state to distinguish between to instances of same class