Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
another resource hack
orbiter0e9a99cb0555
diff --git a/source/de/anomic/search/TextSnippet.java b/source/de/anomic/search/TextSnippet.javaindex a179bdbfc..01a72171b 100644--- a/source/de/anomic/search/TextSnippet.java+++ b/source/de/anomic/search/TextSnippet.java@@ -82,16 +82,13 @@ public class TextSnippet implements Comparable<TextSnippet>, Comparator<TextSnippublic static class Cache {private final ARC<String, String> cache;public Cache() {- cache = new ConcurrentARC<String, String>(maxCache, Math.max(10, Runtime.getRuntime().availableProcessors()));+ cache = new ConcurrentARC<String, String>(maxCache, Math.max(32, 4 * Runtime.getRuntime().availableProcessors()));}public void put(final String wordhashes, final String urlhash, final String snippet) {// generate keyfinal String key = urlhash + wordhashes;- // do nothing if snippet is known- if (cache.containsKey(key)) return;-- // learn new snippet+ // do nothing if snippet is known or learn new snippetcache.insertIfAbsent(key, snippet);}diff --git a/source/de/anomic/yacy/graphics/WebStructureGraph.java b/source/de/anomic/yacy/graphics/WebStructureGraph.javaindex 1153ce909..7b10318df 100644--- a/source/de/anomic/yacy/graphics/WebStructureGraph.java+++ b/source/de/anomic/yacy/graphics/WebStructureGraph.java@@ -178,7 +178,7 @@ public class WebStructureGraph {if (nexturlhashb != null) {nexturlhash = ASCII.String(nexturlhashb);assert nexturlhash.length() == 12 : "nexturlhash.length() = " + nexturlhash.length() + ", nexturlhash = " + nexturlhash;- assert !nexturlhash.substring(6).equals(refhashp);+ //assert !nexturlhash.substring(6).equals(refhashp);// this is a global linkcpg.append(nexturlhash); // store complete hashassert cpg.length() % 12 == 0 : "cpg.length() = " + cpg.length() + ", cpg = " + cpg.toString();