You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2020/09/23 10:24:04 UTC
[lucene-solr] branch branch_8x updated: LUCENE-9535: Reduce the
size of compressed blocks of stored fields by 2x.
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 12664dd LUCENE-9535: Reduce the size of compressed blocks of stored fields by 2x.
12664dd is described below
commit 12664ddbc188c4c1c7f73de7493f341befe32fd0
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Wed Sep 23 12:22:22 2020 +0200
LUCENE-9535: Reduce the size of compressed blocks of stored fields by 2x.
In order to see whether this has any effect on nigthly benchmarks.
---
.../lucene/codecs/lucene87/LZ4WithPresetDictCompressionMode.java | 4 ++--
.../apache/lucene/codecs/lucene87/Lucene87StoredFieldsFormat.java | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene87/LZ4WithPresetDictCompressionMode.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene87/LZ4WithPresetDictCompressionMode.java
index 15b961d..81fcdaf 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene87/LZ4WithPresetDictCompressionMode.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene87/LZ4WithPresetDictCompressionMode.java
@@ -36,8 +36,8 @@ import org.apache.lucene.util.compress.LZ4;
*/
public final class LZ4WithPresetDictCompressionMode extends CompressionMode {
- // Shoot for 10 sub blocks
- private static final int NUM_SUB_BLOCKS = 10;
+ // Shoot for 5 sub blocks
+ private static final int NUM_SUB_BLOCKS = 5;
// And a dictionary whose size is about 16x smaller than sub blocks
private static final int DICT_SIZE_FACTOR = 16;
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene87/Lucene87StoredFieldsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene87/Lucene87StoredFieldsFormat.java
index 1432df8..6241398 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene87/Lucene87StoredFieldsFormat.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene87/Lucene87StoredFieldsFormat.java
@@ -144,7 +144,7 @@ public class Lucene87StoredFieldsFormat extends StoredFieldsFormat {
StoredFieldsFormat impl(Mode mode) {
switch (mode) {
case BEST_SPEED:
- return new CompressingStoredFieldsFormat("Lucene87StoredFieldsFastData", BEST_SPEED_MODE, BEST_SPEED_BLOCK_LENGTH, 1024, 10);
+ return new CompressingStoredFieldsFormat("Lucene87StoredFieldsFastData", BEST_SPEED_MODE, BEST_SPEED_BLOCK_LENGTH, 512, 10);
case BEST_COMPRESSION:
return new CompressingStoredFieldsFormat("Lucene87StoredFieldsHighData", BEST_COMPRESSION_MODE, BEST_COMPRESSION_BLOCK_LENGTH, 4096, 10);
default: throw new AssertionError();
@@ -157,8 +157,8 @@ public class Lucene87StoredFieldsFormat extends StoredFieldsFormat {
/** Compression mode for {@link Mode#BEST_COMPRESSION} */
public static final CompressionMode BEST_COMPRESSION_MODE = new DeflateWithPresetDictCompressionMode();
- // Shoot for 10 sub blocks of 60kB each.
- private static final int BEST_SPEED_BLOCK_LENGTH = 10 * 60 * 1024;
+ // Shoot for 5 sub blocks of 60kB each.
+ private static final int BEST_SPEED_BLOCK_LENGTH = 5 * 60 * 1024;
/** Compression mode for {@link Mode#BEST_SPEED} */
public static final CompressionMode BEST_SPEED_MODE = new LZ4WithPresetDictCompressionMode();