From 4ff3d219e84559f85ba08749280e84afee859625 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 13 Dec 2005 21:15:52 +0000 Subject: [PATCH] increased delay for cacheScan start and slowed down scan process to provide more time to other tasks git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1210 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .classpath | 62 ++++++++++++---------- source/de/anomic/plasma/plasmaHTCache.java | 6 ++- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/.classpath b/.classpath index d33dff45f..6ca39b8fc 100644 --- a/.classpath +++ b/.classpath @@ -1,29 +1,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.java index 381624b9a..dfaf2284a 100644 --- a/source/de/anomic/plasma/plasmaHTCache.java +++ b/source/de/anomic/plasma/plasmaHTCache.java @@ -130,7 +130,7 @@ public final class plasmaHTCache { // start the cache startup thread // this will collect information about the current cache size and elements - serverInstantThread.oneTimeJob(this, "cacheScan", this.log, 5000); + serverInstantThread.oneTimeJob(this, "cacheScan", this.log, 120000); } public int size() { @@ -307,7 +307,7 @@ public final class plasmaHTCache { } public void cacheScan() { - //log.logSystem("STARTING CACHE SCANNING"); + log.logConfig("STARTING HTCACHE SCANNING"); kelondroMScoreCluster doms = new kelondroMScoreCluster(); int c = 0; enumerateFiles ef = new enumerateFiles(this.cachePath, true, false, true, true); @@ -320,6 +320,7 @@ public final class plasmaHTCache { doms.incScore(dom(f)); this.currCacheSize += f.length(); this.cacheAge.put(ageString(d, f), f); + try {Thread.sleep(10);} catch (InterruptedException e) {} } //System.out.println("%" + (String) cacheAge.firstKey() + "=" + cacheAge.get(cacheAge.firstKey())); long ageHours = 0; @@ -334,6 +335,7 @@ public final class plasmaHTCache { ((ageHours < 24) ? (ageHours + " HOURS") : ((ageHours / 24) + " DAYS")) + " OLD"); cleanup(); + log.logConfig("STARTING DNS PREFETCH"); // start to prefetch ip's from dns String dom; long start = System.currentTimeMillis();