tweaks to PDB and BPlusTree constants, a=chris
tweaks to PDB and BPlusTree constants, a=chris
diff --git a/src/configs/Config.php b/src/configs/Config.php
index 61b985612..943deeca1 100755
--- a/src/configs/Config.php
+++ b/src/configs/Config.php
@@ -757,7 +757,7 @@ nsconddefine('URL_FILTER_SIZE', MEMORY_PROFILE * 5000000);
*/
nsconddefine('NUM_URLS_QUEUE_RAM', MEMORY_PROFILE * 80000);
/** number of documents before next gen */
-nsconddefine('NUM_DOCS_PER_PARTITION', MEMORY_PROFILE * 10000);
+nsconddefine('NUM_DOCS_PER_PARTITION', 6 * MEMORY_PROFILE * 10000);
/** precision to round floating points document scores */
nsconddefine('PRECISION', 10);
/** maximum number of links to extract from a page on an initial pass*/
diff --git a/src/library/BPlusTree.php b/src/library/BPlusTree.php
index e468af298..298803563 100644
--- a/src/library/BPlusTree.php
+++ b/src/library/BPlusTree.php
@@ -46,7 +46,7 @@ class BPlusTree
* The MAXIMUM number of keys stored in a tree node (will split if have
* more)
*/
- const MAX_KEYS = 1001;
+ const MAX_KEYS = 2001;
/**
*
*/
diff --git a/src/library/IndexDocumentBundle.php b/src/library/IndexDocumentBundle.php
index f08bbf5b1..62d9b7f86 100644
--- a/src/library/IndexDocumentBundle.php
+++ b/src/library/IndexDocumentBundle.php
@@ -187,6 +187,9 @@ class IndexDocumentBundle implements CrawlConstants
$num_docs_per_partition,
PartitionDocumentBundle::PARTITION_SIZE_THRESHOLD,
C\NS_COMPRESSORS . "GzipCompressor");
+ if (!$read_only_archive) {
+ $this->documents->index_cache_size = 1;
+ }
$this->doc_map_tools = new PackedTableTools([
"PRIMARY KEY" => ["DOC_KEYS", 24], "POS" => "INT",
"SCORE" => "FLOAT"], C\NS_COMPRESSORS . "GzipCompressor");
diff --git a/src/library/PackedTableTools.php b/src/library/PackedTableTools.php
index 20245c719..3851eae7c 100644
--- a/src/library/PackedTableTools.php
+++ b/src/library/PackedTableTools.php
@@ -171,7 +171,6 @@ class PackedTableTools
return null;
}
$this->format[$field_name] = $type_synonyms[$type];
- $unpack_name = $field_name;
if ($type == "BOOL") {
$this->num_bool_columns++;
} else if ($type == "INT") {
diff --git a/src/library/PartitionDocumentBundle.php b/src/library/PartitionDocumentBundle.php
index df28fe1e8..76a0145df 100644
--- a/src/library/PartitionDocumentBundle.php
+++ b/src/library/PartitionDocumentBundle.php
@@ -66,7 +66,7 @@ class PartitionDocumentBundle
/**
*
*/
- const INDEX_CACHE_SIZE = 10;
+ const INDEX_CACHE_SIZE = 15;
/**
*
*/