-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Hello!
We use your gem to make copies of organizations within our application. There are many objects tied to an organization, and some things are indirectly circular, so I am using the dictionary option to clone a couple of things manually beforehand before then calling deep_clone over the entire organization. Also, without the dictionary, deep_clone sometimes cloned objects multiple times because of the dependencies.
But, the dictionary makes my system run out of memory, as there is too much stuff in the Hash. I am wondering if you have any tips to somehow reduce the memory footprint. Ideas that are in my head:
- Use the
to_srepresentation of an object as key to map to the cloned object (or a SHA512 hash?). - Allow to define that only certain types of objects need to be looked up in the dictionary (I somewhat know my problematic dependencies).
Appreciate your work and response.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels