Details
-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
2011.9, 4.6.0-dev
-
None
Description
This is not optimal, as it means more memory usage.
The patterns is:
. ezcontentobject::assignednodes calls eZContentObjectTreeNode::makeObjectsArray( $nodesListArray )
. makeObjectsArray has a $with_contentobject parameter, defaultinng to true
so if an obj has 3 locations, when calling assignednodes eZ will create 3 nodes, and for each node create a new object which is in fact a copy of the existing one.
Proposal: let assignednodes call makeObjectsArray() with a false 2nd parameter, and immediately afterwards inject $this into the created nodes by calling setObject() on them