Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
refined assortment
orbiter76dc89201722
diff --git a/htroot/Performance_p.html b/htroot/Performance_p.htmlindex 50fb4cff2..5624ebc1a 100644--- a/htroot/Performance_p.html+++ b/htroot/Performance_p.html@@ -83,9 +83,9 @@ Changes take effect immediately</td></tr>#{assortmentCluster}#<tr valign="top" class="TableCellDark">- <td class=small>Assortment #[assortmentSlot]# Cache Size:</td>+ <td class=small>Assortment #[assortmentSlot]#:</td><td class=small>#[assortmentSize]#</td>- <td class=small></td>+ <td class=small>Buffer for words appearing exactly on #[assortmentSlot]# different pages.</td></tr>#{/assortmentCluster}#<tr valign="top" class="TableCellDark">diff --git a/source/de/anomic/plasma/plasmaWordIndexCache.java b/source/de/anomic/plasma/plasmaWordIndexCache.javaindex 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-scoresfor (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;}}