cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r967057 - in /cayenne/main/branches/STABLE-3.0: 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:57:44 GMT
Author: aadamchik
Date: Fri Jul 23 11:57:44 2010
New Revision: 967057

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

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

Modified: cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=967057&r1=967056&r2=967057&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt Fri Jul
23 11:57:44 2010
@@ -23,6 +23,7 @@ CAY-1426 EJBQL: ESCAPE fails after posit
 CAY-1452 EJBQL query scalar result is not supported on ROP client
 CAY-1455 "NULL" JDBC type is shown for DbAttribute data types in the Modeler
 CAY-1458 Document Vertical Inheritance
+CAY-1468 Commit performance degradation
 
 ----------------------------------
 Release: 3.0 (final) 

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java?rev=967057&r1=967056&r2=967057&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ObjectStore.java
Fri Jul 23 11:57:44 2010
@@ -481,17 +481,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