cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r967055 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
Date Fri, 23 Jul 2010 11:54:00 GMT
Author: aadamchik
Date: Fri Jul 23 11:54:00 2010
New Revision: 967055

URL: http://svn.apache.org/viewvc?rev=967055&view=rev
Log:
CAY-1468 Commit performance degradation

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=967055&r1=967054&r2=967055&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Fri Jul 23 11:54:00 2010
@@ -54,6 +54,7 @@ CAY-1328 SQLTemplate for DataMap is not 
 CAY-1363 Postgress don't support notations float(a, b)
 CAY-1364 SQL server don't support notations float(a, b)
 CAY-1430 Problems with TINYINT type mapping
+CAY-1468 Commit performance degradation
 
 ----------------------------------
 Release: 3.0.1

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java?rev=967055&r1=967054&r2=967055&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
Fri Jul 23 11:54:00 2010
@@ -419,17 +419,13 @@ public class ObjectStore implements Seri
      */
     void postprocessAfterCommit(GraphDiff parentChanges) {
 
-        Iterator<Map.Entry<Object, Persistent>> entries = objectMap.entrySet().iterator();
-
-        // have to scan through all entries
-        while (entries.hasNext()) {
-            Map.Entry<Object, Persistent> entry = entries.next();
-
-            Persistent object = entry.getValue();
+        // scan through changed objects, set persistence state to committed
+        for (Object id : changes.keySet()) {
+            Persistent object = objectMap.get(id);
 
             switch (object.getPersistenceState()) {
                 case PersistenceState.DELETED:
-                    entries.remove();
+                    objectMap.remove(id);
                     object.setObjectContext(null);
                     object.setPersistenceState(PersistenceState.TRANSIENT);
                     break;



Mime
View raw message