From 700218846c2d5447a56c17498b4a023d7df03fd8 Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 7 Sep 2009 18:50:44 +0000 Subject: [PATCH] disabled or removed sleep calls git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6301 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/server/HTTPDFileHandler.java | 2 ++ source/de/anomic/kelondro/text/MetadataRepository.java | 1 - source/de/anomic/search/Switchboard.java | 4 +--- source/de/anomic/yacy/yacySearch.java | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/source/de/anomic/http/server/HTTPDFileHandler.java b/source/de/anomic/http/server/HTTPDFileHandler.java index 1a0b5158f..5af56a3aa 100644 --- a/source/de/anomic/http/server/HTTPDFileHandler.java +++ b/source/de/anomic/http/server/HTTPDFileHandler.java @@ -1011,12 +1011,14 @@ public final class HTTPDFileHandler { // flush all try {newOut.flush();}catch (final Exception e) {} + /* // wait a little time until everything closes so that clients can read from the streams/sockets if ((contentLength >= 0) && (requestHeader.get(RequestHeader.CONNECTION, "close")).indexOf("keep-alive") == -1) { // in case that the client knows the size in advance (contentLength present) the waiting will have no effect on the interface performance // but if the client waits on a connection interruption this will slow down. try {Thread.sleep(2000);} catch (final InterruptedException e) {} // FIXME: is this necessary? } + */ } // check mime type again using the result array: these are 'magics' diff --git a/source/de/anomic/kelondro/text/MetadataRepository.java b/source/de/anomic/kelondro/text/MetadataRepository.java index 33ffd8b0e..c3dd8e25d 100644 --- a/source/de/anomic/kelondro/text/MetadataRepository.java +++ b/source/de/anomic/kelondro/text/MetadataRepository.java @@ -248,7 +248,6 @@ public final class MetadataRepository implements Iterable { log.logSevere("RuntimeException:", e); } } - //try { Thread.sleep(1000); } catch (final InterruptedException e) { } log.logInfo("URLs vorher: " + urlIndexFile.size() + " Entries loaded during Iteratorloop: " + iteratorCount + " kaputte URLs: " + damagedURLS.size()); final Iterator eiter2 = damagedURLS.iterator(); diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index c138ee71a..0552ede41 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -607,8 +607,6 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi // init robinson cluster // before we do that, we wait some time until the seed list is loaded. - //while (((System.currentTimeMillis() - startedSeedListAquisition) < 8000) && (this.webIndex.seedDB.sizeConnected() == 0)) try {Thread.sleep(1000);} catch (final InterruptedException e) {} - //try {Thread.sleep(1000);} catch (final InterruptedException e) {} this.clusterhashes = this.peers.clusterHashes(getConfig("cluster.peers.yacydomain", "")); // deploy blocking threads @@ -1885,7 +1883,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi // handle access rights switch (adminAuthenticated(header)) { case 0: // wrong password given - try { Thread.sleep(3000); } catch (final InterruptedException e) { } // prevent brute-force + //try { Thread.sleep(3000); } catch (final InterruptedException e) { } // prevent brute-force return false; case 1: // no password given return false; diff --git a/source/de/anomic/yacy/yacySearch.java b/source/de/anomic/yacy/yacySearch.java index 942e7686b..24c8d68cd 100644 --- a/source/de/anomic/yacy/yacySearch.java +++ b/source/de/anomic/yacy/yacySearch.java @@ -288,7 +288,6 @@ public class yacySearch extends Thread { count, maxDist, true, targets, targetPeers[i], indexSegment, peers, crawlResults, containerCache, abstractCache, blacklist, rankingProfile, constraint); searchThreads[i].start(); - //try {Thread.sleep(20);} catch (InterruptedException e) {} } return searchThreads; }