-
-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Milestone
Description
Last time I looked, I couldn't find any way to really squeeze much more perf. This is mainly due to the fact that DeepCopy deep copy an object. As such, you cannot assume the properties of that object as values can be dynamically added. The result is DeepCopy must rely on a brand new instance of ReflectionObject each time, even if you get two objects of the same class.
A way to change that would maybe to add a mode to clone class instances instead, i.e. to rely on ReflectionClass and cache it somehow.
But to be honest this is just an idea like that. I'm actually not sure if it's really worth it, maybe it would be better to start by having a benchmark and see if the perf gain is worth it.