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
pull/1/head
orbiter 20 years ago
parent 3031903d50
commit 4ff3d219e8

@ -25,5 +25,9 @@
<classpathentry kind="lib" path="libx/tm-extractors-0.4.jar"/> <classpathentry kind="lib" path="libx/tm-extractors-0.4.jar"/>
<classpathentry kind="lib" path="libx/wsdl4j.jar"/> <classpathentry kind="lib" path="libx/wsdl4j.jar"/>
<classpathentry kind="lib" path="libx/xerces.jar"/> <classpathentry kind="lib" path="libx/xerces.jar"/>
<classpathentry kind="lib" path="libx/odf_utils_05_11_10.jar"/>
<classpathentry kind="lib" path="libx/jrpm-head.jar"/>
<classpathentry kind="lib" path="libx/jrpm-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libx/commons-codec-1.3.jar"/>
<classpathentry kind="output" path="gen"/> <classpathentry kind="output" path="gen"/>
</classpath> </classpath>

@ -130,7 +130,7 @@ public final class plasmaHTCache {
// start the cache startup thread // start the cache startup thread
// this will collect information about the current cache size and elements // 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() { public int size() {
@ -307,7 +307,7 @@ public final class plasmaHTCache {
} }
public void cacheScan() { public void cacheScan() {
//log.logSystem("STARTING CACHE SCANNING"); log.logConfig("STARTING HTCACHE SCANNING");
kelondroMScoreCluster doms = new kelondroMScoreCluster(); kelondroMScoreCluster doms = new kelondroMScoreCluster();
int c = 0; int c = 0;
enumerateFiles ef = new enumerateFiles(this.cachePath, true, false, true, true); enumerateFiles ef = new enumerateFiles(this.cachePath, true, false, true, true);
@ -320,6 +320,7 @@ public final class plasmaHTCache {
doms.incScore(dom(f)); doms.incScore(dom(f));
this.currCacheSize += f.length(); this.currCacheSize += f.length();
this.cacheAge.put(ageString(d, f), f); this.cacheAge.put(ageString(d, f), f);
try {Thread.sleep(10);} catch (InterruptedException e) {}
} }
//System.out.println("%" + (String) cacheAge.firstKey() + "=" + cacheAge.get(cacheAge.firstKey())); //System.out.println("%" + (String) cacheAge.firstKey() + "=" + cacheAge.get(cacheAge.firstKey()));
long ageHours = 0; long ageHours = 0;
@ -334,6 +335,7 @@ public final class plasmaHTCache {
((ageHours < 24) ? (ageHours + " HOURS") : ((ageHours / 24) + " DAYS")) + " OLD"); ((ageHours < 24) ? (ageHours + " HOURS") : ((ageHours / 24) + " DAYS")) + " OLD");
cleanup(); cleanup();
log.logConfig("STARTING DNS PREFETCH");
// start to prefetch ip's from dns // start to prefetch ip's from dns
String dom; String dom;
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();

Loading…
Cancel
Save