diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index fa8c8f231..b90c89880 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -628,9 +628,6 @@ public class yacysearch { sb.getConfigLong(SwitchboardConstants.REMOTESEARCH_MAXTIME_USER, sb.getConfigLong(SwitchboardConstants.REMOTESEARCH_MAXTIME_DEFAULT, 3000)), (int) sb.getConfigLong(SwitchboardConstants.DHT_BURST_ROBINSON, 0), (int) sb.getConfigLong(SwitchboardConstants.DHT_BURST_MULTIWORD, 0)); - try { - Thread.sleep(global ? 100 : 10); - } catch (final InterruptedException e1) {} // wait a little time to get first results in the search if (offset == 0) { if (sitehost != null && sb.getConfigBool("heuristic.site", false) && authenticated) { diff --git a/htroot/yacysearchlatestinfo.java b/htroot/yacysearchlatestinfo.java index 5ca112ac6..f6524c23c 100644 --- a/htroot/yacysearchlatestinfo.java +++ b/htroot/yacysearchlatestinfo.java @@ -21,7 +21,6 @@ public class yacysearchlatestinfo { return prop; } final QueryParams theQuery = theSearch.getQuery(); - //if (sb.isGlobalMode() && !theQuery.isLocal()) try {Thread.sleep(1000);} catch (InterruptedException e) {} // dynamically update count values final int totalcount = theSearch.getRankingResult().getLocalIndexCount() - theSearch.getRankingResult().getMissCount() - theSearch.getRankingResult().getSortOutCount() + theSearch.getRankingResult().getRemoteIndexCount(); diff --git a/source/de/anomic/search/ResultFetcher.java b/source/de/anomic/search/ResultFetcher.java index 682b5a372..ba55a0bae 100644 --- a/source/de/anomic/search/ResultFetcher.java +++ b/source/de/anomic/search/ResultFetcher.java @@ -129,6 +129,8 @@ public class ResultFetcher { public ResultEntry oneResult(final int item, final long timeout) { // check if we already retrieved this item // (happens if a search pages is accessed a second time) + if (!this.query.isLocal() && item == 0) try { Thread.sleep(100); } catch (final InterruptedException e1) {} // wait a little time to get first results in the search + final long finishTime = System.currentTimeMillis() + timeout; EventTracker.update(EventTracker.EClass.SEARCH, new ProfilingGraph.searchEvent(this.query.id(true), SearchEvent.Type.ONERESULT, "started, item = " + item + ", available = " + this.result.sizeAvailable(), 0, 0), false); if (this.result.sizeAvailable() > item) { @@ -212,7 +214,7 @@ public class ResultFetcher { while ( this.result.sizeAvailable() < this.query.neededResults() && anyWorkerAlive() && System.currentTimeMillis() < timeout) { - try {Thread.sleep(20);} catch (final InterruptedException e) {} + try {Thread.sleep(10);} catch (final InterruptedException e) {} //System.out.println("+++DEBUG-completeResults+++ sleeping " + 200); } return this.result.list(Math.min(this.query.neededResults(), this.result.sizeAvailable()));