Re: [Modeling-users] slooow delete
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2005-03-05 21:09:42
|
John Lenton <jl...@gm...> wrote:
> I'm guessing you forgot the patch?
That's right! Here it is:
Index: Modeling/EditingContext.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/EditingContext.py,v
retrieving revision 1.34
diff -u -r1.34 EditingContext.py
--- Modeling/EditingContext.py 20 Jul 2004 06:21:37 -0000 1.34
+++ Modeling/EditingContext.py 5 Mar 2005 15:41:26 -0000
@@ -351,6 +351,23 @@
# Registering for notifications __TBD
+ def currentStateSummary(self):
+ """
+ Returns some informations about the EditingContext, such as the number of
+ objects it holds, the number of inserted objects, etc.
+ """
+ info={}
+ import time
+ info['time'] = time.time()
+ info['nb_objects'] = len(self._uniquingTable.globalIDs())
+ info['inserted'] = len(self._insertedObjects)
+ info['updated' ] = len(self._updatedObjects)
+ info['deleted' ] = len(self._deletedObjects)
+ info['pending_inserted'] = len(self._pendingInsertedObjects)
+ info['pending_updated' ] = len(self._pendingUpdatedObjects)
+ info['pending_deleted' ] = len(self._pendingDeletedObjects)
+ info['auto_insertion'] = self._propagatesInsertionForRelatedObjects
+ return info
# Changes within the editing context
def allDeletedGlobalIDs(self):
|