Function object_store::coalesce_ranges
source · pub async fn coalesce_ranges<F, E, Fut>(
ranges: &[Range<usize>],
fetch: F,
coalesce: usize
) -> Result<Vec<Bytes>, E>Expand description
Takes a function fetch that can fetch a range of bytes and uses this to
fetch the provided byte ranges
To improve performance it will:
- Combine ranges less than
coalescebytes apart into a single call tofetch - Make multiple
fetchrequests in parallel (up to maximum of 10)