make ReadChunk not require mutable self.
That way we can reduce lock contentions because we lock for much shorter times.
This commit is contained in:
1 parent
26f499b17b
commit
e9764238df
4 files changed
+23
-23
No files matched your search
@@ -1119,7 +1119,7 @@ async fn dump_image<W: Write>(
|
||||
|
||||
let most_used = index.find_most_used_chunks(8);
|
||||
|
||||
let mut chunk_reader = RemoteChunkReader::new(client.clone(), crypt_config, most_used);
|
||||
let chunk_reader = RemoteChunkReader::new(client.clone(), crypt_config, most_used);
|
||||
|
||||
// Note: we avoid using BufferedFixedReader, because that add an additional buffer/copy
|
||||
// and thus slows down reading. Instead, directly use RemoteChunkReader
|
||||
|
||||
Reference in new issue
Block a user