Skip to content

Commit 2affc74

Browse files
committed
Turbopack: bigger small value blocks
1 parent 86b9cba commit 2affc74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

turbopack/crates/turbo-persistence/src/static_sorted_file_builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ use crate::static_sorted_file::{
1717
};
1818

1919
/// The maximum number of entries that should go into a single key block
20-
const MAX_KEY_BLOCK_ENTRIES: usize = 100 * 1024;
20+
const MAX_KEY_BLOCK_ENTRIES: usize = MAX_KEY_BLOCK_SIZE / KEY_BLOCK_ENTRY_META_OVERHEAD;
2121
/// The maximum bytes that should go into a single key block
2222
// Note this must fit into 3 bytes length
2323
const MAX_KEY_BLOCK_SIZE: usize = 16 * 1024;
2424
/// Overhead of bytes that should be counted for entries in a key block in addition to the key size
2525
const KEY_BLOCK_ENTRY_META_OVERHEAD: usize = 8;
2626
/// The maximum number of entries that should go into a single small value block
27-
const MAX_SMALL_VALUE_BLOCK_ENTRIES: usize = 100 * 1024;
27+
const MAX_SMALL_VALUE_BLOCK_ENTRIES: usize = MAX_SMALL_VALUE_BLOCK_SIZE;
2828
/// The maximum bytes that should go into a single small value block
29-
const MAX_SMALL_VALUE_BLOCK_SIZE: usize = 16 * 1024;
29+
const MAX_SMALL_VALUE_BLOCK_SIZE: usize = 64 * 1024;
3030
/// The aimed false positive rate for the AMQF
3131
const AMQF_FALSE_POSITIVE_RATE: f64 = 0.01;
3232

0 commit comments

Comments
 (0)