jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1489341 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
Date Tue, 04 Jun 2013 08:52:57 GMT
Author: jukka
Date: Tue Jun  4 08:52:56 2013
New Revision: 1489341

URL: http://svn.apache.org/r1489341
Log:
OAK-853: Many child nodes: Diffing causes many calls to MicroKernel.getNodes

Optimization for the x.compareAgainstBaseState(x, ...) special case

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java?rev=1489341&r1=1489340&r2=1489341&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
Tue Jun  4 08:52:56 2013
@@ -337,6 +337,10 @@ public class ModifiedNodeState extends A
     @Override
     public boolean compareAgainstBaseState(
             NodeState base, final NodeStateDiff diff) {
+        if (this == base) {
+            return true; // no differences
+        }
+
         for (Map.Entry<String, PropertyState> entry : properties.entrySet()) {
             PropertyState before = base.getProperty(entry.getKey());
             PropertyState after = entry.getValue();



Mime
View raw message