From: <ndi...@us...> - 2002-09-08 02:35:46
|
Update of /cvsroot/modus/org/bacfug/modus In directory usw-pr-cvs1:/tmp/cvs-serv28566/bacfug/modus Modified Files: basecontentobject.cfc Log Message: only instantiate a new persister if it's not already made, since the persister doesn't hold any instance data it shouldn't need a new one every time we init() the object instance, right? In fact, we should probably cache this even more aggressively in the request scope, or even a persistent scope (if they EVER fix the pageContext issues). Index: basecontentobject.cfc =================================================================== RCS file: /cvsroot/modus/org/bacfug/modus/basecontentobject.cfc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** basecontentobject.cfc 3 Sep 2002 23:02:43 -0000 1.4 --- basecontentobject.cfc 8 Sep 2002 02:35:42 -0000 1.5 *************** *** 22,27 **** //by default, it was not loaded instance.wasLoadedFlag = false; ! //create an instance of the persister for this object, to avoid unnecessary createObject() calls later ! instance.persister = createObject("component",config.persister).init(); //initialize the properties of this instance initProperties(); --- 22,28 ---- //by default, it was not loaded instance.wasLoadedFlag = false; ! //create an instance of the persister for this object if we need to, to avoid unnecessary createObject() calls later ! if(NOT structKeyExists(instance,"persister")) ! instance.persister = createObject("component",config.persister).init(); //initialize the properties of this instance initProperties(); |