Skip to content

Commit a34bb2e

Browse files
committed
Reduce merge buffer size.
1 parent 5f3f29f commit a34bb2e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

common/src/buffered_file_slice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ use std::ops::Range;
66
use super::file_slice::FileSlice;
77
use super::{HasLen, OwnedBytes};
88

9-
const DEFAULT_BUFFER_MAX_SIZE: usize = 4 * 1024 * 1024; // 4 MB
9+
const DEFAULT_BUFFER_MAX_SIZE: usize = 512 * 1024; // 512K
1010

1111
/// A buffered reader for a FileSlice.
1212
///
1313
/// Reads the underlying `FileSlice` in large, sequential chunks to amortize
1414
/// the cost of `read_bytes` calls, while keeping peak memory usage under control.
1515
///
1616
/// TODO: Rather than wrapping a `FileSlice` in buffering, it will usually be better to adjust a
17-
/// `FileHandle` to directly handle buffering itself (as that allows separate `FileSlice`s read
18-
/// from the same `FileHandle` to share buffers.)
17+
/// `FileHandle` to directly handle buffering itself.
18+
/// TODO: See: https://github.com/paradedb/paradedb/issues/3374
1919
pub struct BufferedFileSlice {
2020
file_slice: FileSlice,
2121
buffer: RefCell<OwnedBytes>,

0 commit comments

Comments
 (0)