jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1564238 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
Date Tue, 04 Feb 2014 10:09:01 GMT
Author: thomasm
Date: Tue Feb  4 10:09:01 2014
New Revision: 1564238

URL: http://svn.apache.org/r1564238
Log:
OAK-1383 Reduce memory usage of the cache

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1564238&r1=1564237&r2=1564238&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
Tue Feb  4 10:09:01 2014
@@ -677,11 +677,18 @@ public class DocumentMK implements Micro
         
         public <K extends CacheValue, V extends CacheValue> Cache<K, V> buildCache(long
maxWeight) {
             if (LIRS_CACHE) {
-                return CacheLIRS.newBuilder().weigher(weigher).
-                        maximumWeight(maxWeight).recordStats().build();
+                return CacheLIRS.newBuilder().
+                        weigher(weigher).
+                        averageWeight(2000).
+                        maximumWeight(maxWeight).
+                        recordStats().
+                        build();
             }
-            return CacheBuilder.newBuilder().weigher(weigher).
-                    maximumWeight(maxWeight).recordStats().build();
+            return CacheBuilder.newBuilder().
+                    weigher(weigher).
+                    maximumWeight(maxWeight).
+                    recordStats().
+                    build();
         }
     }
 



Mime
View raw message