Skip to content

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

opening of array files at startup time, not when first time the web index is accessed this speeds up the first search after startup

orbitera3bfd668aa98
diff --git a/source/de/anomic/kelondro/kelondroCollectionIndex.java b/source/de/anomic/kelondro/kelondroCollectionIndex.java
index 524d7460e..b1c90035c 100644
--- a/source/de/anomic/kelondro/kelondroCollectionIndex.java
+++ b/source/de/anomic/kelondro/kelondroCollectionIndex.java
@@ -130,12 +130,13 @@ public class kelondroCollectionIndex {
// open array files
this.arrays = new HashMap(); // all entries will be dynamically created with getArray()
- if (((fileIndexGeneration) || (ramIndexGeneration))) {
+ if ((fileIndexGeneration) || (ramIndexGeneration)) {
serverLog.logFine("STARTUP", "STARTED INITIALIZATION OF NEW COLLECTION INDEX. THIS WILL TAKE SOME TIME");
- openAllArrayFiles(((fileIndexGeneration) || (ramIndexGeneration)), indexOrder);
+ } else {
+ if (index == null) index = openIndexFile(path, filenameStub, indexOrder, preloadTime, loadfactor, rowdef);
+ serverLog.logFine("STARTUP", "OPENING COLLECTION INDEX");
}
-
- // open/create index table
+ openAllArrayFiles(((fileIndexGeneration) || (ramIndexGeneration)), indexOrder);
if (index == null) index = openIndexFile(path, filenameStub, indexOrder, preloadTime, loadfactor, rowdef);
}