Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
once again a performance hack
orbiter09de5da74a89
diff --git a/source/de/anomic/kelondro/util/FileUtils.java b/source/de/anomic/kelondro/util/FileUtils.javaindex fa648ec55..11d50b9bc 100644--- a/source/de/anomic/kelondro/util/FileUtils.java+++ b/source/de/anomic/kelondro/util/FileUtils.java@@ -533,6 +533,7 @@ public final class FileUtils {}public static Iterator<String> strings(byte[] a) {+ if (a == null) return new ArrayList<String>().iterator();try {return new StringsIterator(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(a), "UTF-8")));} catch (UnsupportedEncodingException e) {diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.javaindex 215e4f770..ca8c07882 100644--- a/source/de/anomic/search/Switchboard.java+++ b/source/de/anomic/search/Switchboard.java@@ -1656,7 +1656,6 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi}final long stackEndTime = System.currentTimeMillis();if (log.isInfo()) log.logInfo("CRAWL: ADDED " + hl.size() + " LINKS FROM " + entry.url().toNormalform(false, true) +- ", NEW CRAWL STACK SIZE IS " + crawlQueues.noticeURL.stackSize(NoticedURL.STACK_TYPE_CORE) +", STACKING TIME = " + (stackEndTime-stackStartTime) +", PARSING TIME = " + (parsingEndTime-parsingStartTime));}diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 6c98d9f0f..74b107777 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -235,7 +235,6 @@ public final class serverCore extends serverAbstractBusyThread implements serverthis.log.logInfo("Trying to bind server to port " + bindPort+ " with "+ extendedPort + "as seedPort.");this.socket.bind(/*bindAddress = */generateSocketAddress(bindPort));}-// updating the port information//yacyCore.seedDB.mySeed.put(yacySeed.PORT,Integer.toString(bindAddress.getPort()));//yacyCore.seedDB.mySeed().put(yacySeed.PORT, extendedPort);diff --git a/source/de/anomic/yacy/yacyURL.java b/source/de/anomic/yacy/yacyURL.javaindex 00dde31c6..06e6ec420 100644--- a/source/de/anomic/yacy/yacyURL.java+++ b/source/de/anomic/yacy/yacyURL.java@@ -786,7 +786,9 @@ public class yacyURL implements Serializable {public final String hash() {// in case that the object was initialized without a known url hash, compute it now- if (this.hash == null) this.hash = urlHashComputation();+ synchronized (this) {+ if (this.hash == null) this.hash = urlHashComputation();+ }return this.hash;}