diff --git a/htroot/Performance_p.html b/htroot/Performance_p.html
index 50fb4cff2..5624ebc1a 100644
--- a/htroot/Performance_p.html
+++ b/htroot/Performance_p.html
@@ -83,9 +83,9 @@ Changes take effect immediately
#{assortmentCluster}#
- Assortment #[assortmentSlot]# Cache Size: |
+ Assortment #[assortmentSlot]#: |
#[assortmentSize]# |
- |
+ Buffer for words appearing exactly on #[assortmentSlot]# different pages. |
#{/assortmentCluster}#
diff --git a/source/de/anomic/plasma/plasmaWordIndexCache.java b/source/de/anomic/plasma/plasmaWordIndexCache.java
index a75742a15..92145430e 100644
--- a/source/de/anomic/plasma/plasmaWordIndexCache.java
+++ b/source/de/anomic/plasma/plasmaWordIndexCache.java
@@ -56,7 +56,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {
private static final String oldSingletonFileName = "indexSingletons0.db";
private static final String newSingletonFileName = "indexAssortment001.db";
private static final String indexAssortmentClusterPath = "ACLUSTER";
- private static final int assortmentLimit = 3;
+ private static final int assortmentLimit = 6;
// class variables
@@ -378,11 +378,16 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {
if (count > 2000) return count;
}
+ // stop flushing if cache is shrinked enough
+ // avoid as possible to flush high-scores
+ if (cache.size() < this.maxWords) return count;
+
// flush high-scores
for (int cluster = clusterCandidate.length; cluster > 0; cluster--) {
candidateCounter = 0;
i = clusterCandidate[cluster - 1].entrySet().iterator();
while (i.hasNext()) {
+ if (cache.size() < this.maxWords) return count;
entry = (Map.Entry) i.next();
key = (String) entry.getValue();
createTime = (Long) entry.getKey();
@@ -391,7 +396,6 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {
candidateCounter += cluster + 1;
log.logDebug("flushed high-cluster #" + (cluster + 1) + ", key=" + key + ", count=" + count + ", cachesize=" + cache.size());
}
- if (count > 2000) return count;
}
}