Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv17748
Modified Files:
EditingContext.py
Log Message:
Fixed: objectsWithFetchSpecification() was trying to remove the very
same set of deleted objects from the result set, once for each entity
of the FetchSpecification. While this was not buggy, this was useless,
and causing a unnecessary waste of cpu resources when the fetch was
made against a big class/entity hierarchy (and, of course, when the
fetch specification is deep).
Index: EditingContext.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/EditingContext.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** EditingContext.py 3 Jul 2003 23:03:38 -0000 1.24
--- EditingContext.py 16 Jul 2003 08:45:45 -0000 1.25
***************
*** 1226,1252 ****
entitiesNames+=entity.allSubEntitiesNames()
for entityName in entitiesNames:
- # do not include deleted objects in the returned set of objects
ec_insertedObjects = self.allInsertedObjects()
-
- if ec.isaChildOf(self):
-
- # If we're returning objects for a child's use, we remove the one
- # that are marked for deletion in the parent (self) However, the
- # deleted objects in self and the ones in the child-ec are distinct,
- # but the GlobalIDs are the same and this is what we do here:
- # compare the gIDs and remove the apropriate objects from the result
- # set
- ec_deletedGids=self._deletedObjects+self._pendingDeletedObjects
- objects=[o for o in objects
- if ec.globalIDForObject(o) not in ec_deletedGids]
-
- else:
- # We work for self, so we just remove the ones that are already
- # marked as deleted
- ec_deletedObjects = self.allDeletedObjects()
- objects=[o for o in objects if o not in ec_deletedObjects]
-
- # now append inserted objects
objs=[o for o in ec_insertedObjects if o.entityName()==entityName]
if fs.qualifier():
--- 1226,1251 ----
entitiesNames+=entity.allSubEntitiesNames()
+ # do not include deleted objects in the returned set of objects
+ if ec.isaChildOf(self):
+
+ # If we're returning objects for a child's use, we remove the one
+ # that are marked for deletion in the parent (self) However, the
+ # deleted objects in self and the ones in the child-ec are distinct,
+ # but the GlobalIDs are the same and this is what we do here:
+ # compare the gIDs and remove the apropriate objects from the result
+ # set
+ ec_deletedGids=self._deletedObjects+self._pendingDeletedObjects
+ objects=[o for o in objects
+ if ec.globalIDForObject(o) not in ec_deletedGids]
+
+ else:
+ # We work for self, so we just remove the ones that are already
+ # marked as deleted
+ ec_deletedObjects = self.allDeletedObjects()
+ objects=[o for o in objects if o not in ec_deletedObjects]
+
+ # now append inserted objects
for entityName in entitiesNames:
ec_insertedObjects = self.allInsertedObjects()
objs=[o for o in ec_insertedObjects if o.entityName()==entityName]
if fs.qualifier():
|