jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1496403 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Date Tue, 25 Jun 2013 10:38:16 GMT
Author: mduerig
Date: Tue Jun 25 10:38:15 2013
New Revision: 1496403

URL: http://svn.apache.org/r1496403
Log:
OAK-144 Implement Observation
Lower child node diff threshold from 100 to 10

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java?rev=1496403&r1=1496402&r2=1496403&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Tue Jun 25 10:38:15 2013
@@ -78,6 +78,12 @@ public final class KernelNodeState exten
     static final int MAX_CHILD_NODE_NAMES = 100;
 
     /**
+     * Number of child nodes beyond which {@link MicroKernel#diff(String, String, String,
int)}
+     * is used for diffing.
+     */
+    public static final int LOCAL_DIFF_THRESHOLD = 10;
+
+    /**
      * Dummy cache instance for static {@link #NULL} kernel node state.
      */
     private static final LoadingCache<String, KernelNodeState> DUMMY_CACHE =
@@ -420,7 +426,7 @@ public final class KernelNodeState exten
                     } else if (id != null && id.equals(kbase.id)) {
                         return true; // no differences
                     } else if (path.equals(kbase.path)
-                            && childNodeCount > MAX_CHILD_NODE_NAMES) {
+                            && childNodeCount > LOCAL_DIFF_THRESHOLD) {
                         // use MK.diff() when there are 'many' child nodes
                         String jsonDiff = kernel.diff(kbase.getRevision(), revision, path,
0);
                         processJsonDiff(jsonDiff, kbase, diff);



Mime
View raw message