fix: use larger buffers for remote storage (#6069)

Currently using 8kB buffers, raise that to 32kB to hopefully 1/4 of
`spawn_blocking` usage. Also a drive-by fixing of last `tokio::io::copy`
to `tokio::io::copy_buf`.
This commit is contained in:
Joonas Koivunen
2023-12-07 21:36:44 +02:00
committed by GitHub
parent 7aa1e58301
commit 37fdbc3aaa
5 changed files with 11 additions and 5 deletions

View File

@@ -260,7 +260,7 @@ impl RemoteStorage for LocalFs {
let mut buffer_to_read = data.take(from_size_bytes);
// alternatively we could just write the bytes to a file, but local_fs is a testing utility
let bytes_read = io::copy(&mut buffer_to_read, &mut destination)
let bytes_read = io::copy_buf(&mut buffer_to_read, &mut destination)
.await
.with_context(|| {
format!(