git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2245 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 66964dc015
commit 4cc6e6551f

@ -338,7 +338,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th
<td class="small" align="right">#[usedTotal]# MB</td>
<td class="small" align="right">#[currTotal]# MB</td>
<td class="small" align="right">#[dfltTotal]# MB</td>
<td class="small" align="right">#[goodTotal]# MB</td>
<td class="small" align="right">#[bestTotal]# MB</td>
<td class="small" align="left">Sum of memory amounts</td>
</tr>
@ -347,7 +346,6 @@ Increasing this cache may speed up crawling, but not much space is needed, so th
<td class="small" align="right" colspan="11">Re-Configuration:</td>
<td class="small" align="center"><input type="submit" name="setCustom" value="Set"><br>these<br>custom<br>values<br>&nbsp;</td>
<td class="small" align="center"><input type="submit" name="setDefault" value="Set"><br>all<br>default<br>values<br>&nbsp;</td>
<td class="small" align="center"><input type="submit" name="setGood" value="Set"><br>all<br>recom-<br>mended values<br>&nbsp;</td>
<td class="small" align="center"><input type="submit" name="setBest" value="Set"><br>all<br>optimum<br>values<br>&nbsp;</td>
<td class="small" align="left">Changes take effect after <b>re-start</b> of YaCy</td>
</tr>

@ -550,8 +550,6 @@ public class kelondroRecords {
this.tailChunk = new byte[tailchunksize];
for (int i = 0; i < headchunksize; i++) this.headChunk[i] = 0;
for (int i = 0; i < tailchunksize; i++) this.tailChunk[i] = 0;
this.headChanged = true;
this.tailChanged = true;
}
private Node(Handle handle) throws IOException {
@ -608,7 +606,6 @@ public class kelondroRecords {
//System.out.println("**NO CACHE for " + this.handle.index + "**");
this.headChunk = new byte[headchunksize];
entryFile.readFully(seekpos(this.handle), this.headChunk, 0, this.headChunk.length);
this.headChanged = false;
} else synchronized(cacheHeaders) {
byte[] cacheEntry = null;
int cp = CP_HIGH;
@ -621,7 +618,7 @@ public class kelondroRecords {
//this.tailChunk = new byte[tailchunksize];
entryFile.readFully(seekpos(this.handle), this.headChunk, 0, this.headChunk.length);
this.headChanged = true; // provoke a cache store
// calculate cache priority
cp = CP_HIGH;
if (OHHANDLEC == 3) {
Handle l = getOHHandle(1);
@ -629,6 +626,7 @@ public class kelondroRecords {
if ((l == null) && (r == null)) cp = CP_LOW;
else if ((l == null) || (r == null)) cp = CP_MEDIUM;
}
// if space left in cache, copy these value to the cache
update2Cache(cp);
} else {
@ -641,7 +639,6 @@ public class kelondroRecords {
//this.headChunk = new byte[headchunksize];
//System.arraycopy(cacheEntry, 0, this.headChunk, 0, headchunksize);
this.headChunk = cacheEntry;
this.headChanged = false;
}
}
}
@ -752,12 +749,14 @@ public class kelondroRecords {
//System.out.println("WRITEH(" + filename + ", " + seekpos(this.handle) + ", " + this.headChunk.length + ")");
entryFile.write(seekpos(this.handle), this.headChunk);
update2Cache(cachePriority);
this.headChanged = false;
}
// save tail
if ((this.tailChunk != null) && (this.tailChanged)) {
//System.out.println("WRITET(" + filename + ", " + (seekpos(this.handle) + headchunksize) + ", " + this.tailChunk.length + ")");
entryFile.write(seekpos(this.handle) + headchunksize, this.tailChunk);
this.tailChanged = false;
}
}
@ -837,7 +836,7 @@ public class kelondroRecords {
// store the cache entry
boolean upd = false;
cacheHeaders.putb(cacheHandle.index, headChunk);
upd = (cacheHeaders.putb(cacheHandle.index, headChunk) != null);
if (upd) writeDouble++; else writeUnique++;
// delete the cache entry buffer

Loading…
Cancel
Save