Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

small bug fixes and experiments with search speed enhancement

orbiterf8d0454c534c
diff --git a/htroot/NetworkPicture.java b/htroot/NetworkPicture.java
index 92baea5c4..d122d23d7 100644
--- a/htroot/NetworkPicture.java
+++ b/htroot/NetworkPicture.java
@@ -64,8 +64,8 @@ public class NetworkPicture {
int width = 1024; // 640x480 = VGA, 768x576 = SD/4:3, 1024x576 =SD/16:9 1280x720 = HD/16:9, 1920x1080 = FULL HD/16:9
int height = 576;
- int passiveLimit = 10080; // minutes; 1440 = 1 day; 720 = 12 hours; 10080 = 1 week;
- int potentialLimit = 10080;
+ int passiveLimit = 1440; // minutes; 1440 = 1 day; 720 = 12 hours; 1440 = 24 hours, 10080 = 1 week;
+ int potentialLimit = 1440;
int maxCount = 1000;
String bgcolor = NetworkGraph.COL_BACKGROUND;
boolean corona = true;
diff --git a/source/net/yacy/document/parser/swfParser.java b/source/net/yacy/document/parser/swfParser.java
index 079fa1c13..54b55d658 100644
--- a/source/net/yacy/document/parser/swfParser.java
+++ b/source/net/yacy/document/parser/swfParser.java
@@ -66,7 +66,6 @@ public class swfParser extends AbstractParser implements Parser {
try {
contents = swf2html.convertSWFToHTML(source);
} catch (NegativeArraySizeException e) {
- Log.logException(e);
throw new Parser.Failure(e.getMessage(), location);
} catch (IOException e) {
throw new Parser.Failure(e.getMessage(), location);
diff --git a/source/net/yacy/kelondro/rwi/IndexCell.java b/source/net/yacy/kelondro/rwi/IndexCell.java
index 77b62cf4f..46db6c440 100644
--- a/source/net/yacy/kelondro/rwi/IndexCell.java
+++ b/source/net/yacy/kelondro/rwi/IndexCell.java
@@ -92,7 +92,7 @@ public final class IndexCell<ReferenceType extends Reference> extends AbstractBu
this.array = new ReferenceContainerArray<ReferenceType>(cellPath, prefix, factory, termOrder, payloadrow, merger);
this.ram = new ReferenceContainerCache<ReferenceType>(factory, payloadrow, termOrder);
- this.countCache = new ComparableARC<byte[], Integer>(100, termOrder);
+ this.countCache = new ComparableARC<byte[], Integer>(1000, termOrder);
this.maxRamEntries = maxRamEntries;
this.merger = merger;
this.lastCleanup = System.currentTimeMillis();
diff --git a/source/net/yacy/kelondro/rwi/ReferenceContainer.java b/source/net/yacy/kelondro/rwi/ReferenceContainer.java
index 4ab8c8645..e3715b655 100644
--- a/source/net/yacy/kelondro/rwi/ReferenceContainer.java
+++ b/source/net/yacy/kelondro/rwi/ReferenceContainer.java
@@ -558,28 +558,23 @@ public class ReferenceContainer<ReferenceType extends Reference> extends RowSet
public static final TreeMap<String, String> decompressIndex(ByteBuffer ci, final String peerhash) {
TreeMap<String, String> target = new TreeMap<String, String>();
// target is a mapping from url-hashes to a string of peer-hashes
- if ((ci.byteAt(0) == '{') && (ci.byteAt(ci.length() - 1) == '}')) {
- //System.out.println("DEBUG-DECOMPRESS: input is " + ci.toString());
- ci = ci.trim(1, ci.length() - 2);
- String dom, url, peers;
- while ((ci.length() >= 13) && (ci.byteAt(6) == ':')) {
+ if (ci.byteAt(0) != '{' || ci.byteAt(ci.length() - 1) != '}') return target;
+ //System.out.println("DEBUG-DECOMPRESS: input is " + ci.toString());
+ ci = ci.trim(1, ci.length() - 2);
+ String dom, url, peers;
+ while ((ci.length() >= 13) && (ci.byteAt(6) == ':')) {
+ assert ci.length() >= 6 : "ci.length() = " + ci.length();
+ dom = ci.toString(0, 6);
+ ci.trim(7);
+ while ((ci.length() > 0) && (ci.byteAt(0) != ',')) {
assert ci.length() >= 6 : "ci.length() = " + ci.length();
- dom = ci.toString(0, 6);
- ci.trim(7);
- while ((ci.length() > 0) && (ci.byteAt(0) != ',')) {
- assert ci.length() >= 6 : "ci.length() = " + ci.length();
- url = ci.toString(0, 6) + dom;
- ci.trim(6);
- peers = target.get(url);
- if (peers == null) {
- target.put(url, peerhash);
- } else {
- target.put(url, peers + peerhash);
- }
- //System.out.println("DEBUG-DECOMPRESS: " + url + ":" + target.get(url));
- }
- if (ci.byteAt(0) == ',') ci.trim(1);
+ url = ci.toString(0, 6) + dom;
+ ci.trim(6);
+ peers = target.put(url, peerhash);
+ if (peers != null) target.put(url, peers + peerhash);
+ //System.out.println("DEBUG-DECOMPRESS: " + url + ":" + target.get(url));
}
+ if (ci.byteAt(0) == ',') ci.trim(1);
}
return target;
}
diff --git a/source/net/yacy/kelondro/table/SplitTable.java b/source/net/yacy/kelondro/table/SplitTable.java
index dc85b5caa..e69dc4f25 100644
--- a/source/net/yacy/kelondro/table/SplitTable.java
+++ b/source/net/yacy/kelondro/table/SplitTable.java
@@ -364,6 +364,7 @@ public class SplitTable implements Index, Iterable<Row.Entry> {
public boolean put(final Row.Entry row) throws IOException, RowSpaceExceededException {
assert row.objectsize() <= this.rowdef.objectsize;
byte[] key = row.getPrimaryKeyBytes();
+ if (tables == null) return true;
synchronized (this.tables) {
Index keeper = keeperOf(key);
if (keeper != null) return keeper.put(row);
@@ -378,6 +379,7 @@ public class SplitTable implements Index, Iterable<Row.Entry> {
private Index keeperOf(final byte[] key) {
if (key == null) return null;
+ if (tables == null) return null;
for (Index oi: tables.values()) {
if (oi.has(key)) return oi;
}