Skip to content

Commit 6416335

Browse files
committed
docs
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
1 parent 01a0aad commit 6416335

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

vortex-file/src/open.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ impl VortexOpenOptions {
164164
/// Open a Vortex file from an in-memory buffer.
165165
///
166166
/// This uses a [`BufferSegmentSource`] that resolves segments synchronously
167-
/// by slicing the buffer directly, bypassing the async I/O pipeline
168-
/// (mpsc channels, coalescing, oneshot callbacks) used for file-backed reads.
167+
/// by slicing the buffer directly, bypassing the async I/O pipeline.
169168
pub fn open_buffer<B: Into<ByteBuffer>>(self, buffer: B) -> VortexResult<VortexFile> {
170169
let buffer: ByteBuffer = buffer.into();
171170

@@ -183,9 +182,6 @@ impl VortexOpenOptions {
183182
None => block_on(opts.read_footer(&buffer))?,
184183
};
185184

186-
// SharedSegmentSource is used in other cases to deduplicate concurrent
187-
// I/O requests for the same segment. For in-memory buffers, segment
188-
// resolution corresponds to pointer arithmetic on the in-memory buffer.
189185
let segment_source = Arc::new(BufferSegmentSource::new(
190186
buffer,
191187
footer.segment_map().clone(),

vortex-file/src/segments/source.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,10 @@ impl RequestMetrics {
253253
}
254254
}
255255

256-
/// A [`SegmentSource`] that resolves segments synchronously by slicing an
256+
/// A [`SegmentSource`] that resolves segments synchronously from an
257257
/// in-memory [`ByteBuffer`].
258258
///
259-
/// Unlike [`FileSegmentSource`], this skips the async I/O pipeline entirely —
260-
/// no mpsc channels, no coalescing, no oneshot callbacks. Each `request()`
261-
/// returns a [`future::ready`] with the sliced buffer, making it suitable for
262-
/// memory-mapped or fully in-memory files where the I/O overhead of the async
263-
/// pipeline dominates.
259+
/// Resolves segments synchronously, bypassing the async I/O pipeline.
264260
pub(crate) struct BufferSegmentSource {
265261
buffer: ByteBuffer,
266262
segments: Arc<[SegmentSpec]>,

0 commit comments

Comments
 (0)