jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1378182 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Date Tue, 28 Aug 2012 15:40:27 GMT
Author: mreutegg
Date: Tue Aug 28 15:40:27 2012
New Revision: 1378182

URL: http://svn.apache.org/viewvc?rev=1378182&view=rev
Log:
OAK-284: Reduce memory usage of KernelNodeState

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=1378182&r1=1378181&r2=1378182&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 Aug 28 15:40:27 2012
@@ -21,6 +21,7 @@ package org.apache.jackrabbit.oak.kernel
 import static org.apache.jackrabbit.oak.kernel.CoreValueMapper.fromJsopReader;
 import static org.apache.jackrabbit.oak.kernel.CoreValueMapper.listFromJsopReader;
 
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -124,6 +125,10 @@ public final class KernelNodeState exten
             } while (reader.matches(','));
             reader.read('}');
             reader.read(JsopReader.END);
+            // optimize for empty childNodes
+            if (childNodes.isEmpty()) {
+                childNodes = Collections.emptyMap();
+            }
         }
     }
 



Mime
View raw message