jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1005112 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/ConcurrentCache.java
Date Wed, 06 Oct 2010 16:35:14 GMT
Author: jukka
Date: Wed Oct  6 16:35:14 2010
New Revision: 1005112

URL: http://svn.apache.org/viewvc?rev=1005112&view=rev
Log:
JCR-2770: Initial size of ConcurrentCache depends on number of segments (available processors)

Use a smaller initial map size to avoid OOM problems

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/ConcurrentCache.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/ConcurrentCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/ConcurrentCache.java?rev=1005112&r1=1005111&r2=1005112&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/ConcurrentCache.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cache/ConcurrentCache.java
Wed Oct  6 16:35:14 2010
@@ -63,7 +63,7 @@ public class ConcurrentCache<K, V> exten
     public ConcurrentCache(int numberOfSegments) {
         this.segments = new Map[numberOfSegments];
         for (int i = 0; i < segments.length; i++) {
-            segments[i] = new LinkedHashMap<K, E<V>>(1024, 0.75f, true) {
+            segments[i] = new LinkedHashMap<K, E<V>>(16, 0.75f, true) {
                 @Override
                 protected boolean removeEldestEntry(Map.Entry<K, E<V>> eldest)
{
                     if (isTooBig()) {



Mime
View raw message