Open CastixGitHub opened 2 years ago
So at a high-level I know what copy-on-write means, but to be honest I'm not real sure how to evaluate this. You have a lot of test cases, which is good, but still its pretty complex and detailed. I wouldn't know if there's some other cases that need to be considered. Or if this has a performance impact.
To be honest, I'd rather not add this much more complexity into Ming. It seems like a lot of logic and nuance and possible performance impact (just a guess, no idea). I'll post back on the other merge request as well, about how we might proceed or not.
answer to https://github.com/TurboGears/Ming/pull/45#issuecomment-1133466260
I implemented it using a high level approach, should be good enough to be used with pymongo dictionaries, but I didn't think about supporting other kind of objects (that would lead again to deepcopy, unless we are able to drop the abstractions and go low level, but I didn't find anything about copy on write on the python ecosystem (this is an interesting read but unrelated) so i don't know how to proceed in that direction, i'm not a kernel developer)
Proof Of Concept
How to apply to the current Object/ObjectState/Tracker
I need to check.