Skip to content

Commit e9637bf

Browse files
cgzonesotavio
authored andcommitted
Increase buffer size
Tested against cov-analysis-linux64-2022.06.tar.gz (1.2G) with /tmp mounted on a tmpfs: $ hyperfine -w 1 -m 10 -c 'rm -Rf /tmp/benchtest/*' './target/release/examples/uncompress_tool uncompress-archive cov-analysis-linux64-2022.06.tar.gz /tmp/benchtest true' Benchmark 1: ./target/release/examples/uncompress_tool uncompress-archive cov-analysis-linux64-2022.06.tar.gz /tmp/benchtest true Time (mean ± σ): 9.516 s ± 0.053 s [User: 7.088 s, System: 2.401 s] Range (min … max): 9.462 s … 9.626 s 10 runs $ hyperfine -w 1 -m 10 -c 'rm -Rf /tmp/benchtest/*' './target/release/examples/uncompress_tool uncompress-archive cov-analysis-linux64-2022.06.tar.gz /tmp/benchtest true' Benchmark 1: ./target/release/examples/uncompress_tool uncompress-archive cov-analysis-linux64-2022.06.tar.gz /tmp/benchtest true Time (mean ± σ): 8.055 s ± 0.027 s [User: 6.386 s, System: 1.643 s] Range (min … max): 8.008 s … 8.085 s 10 runs
1 parent 4babf71 commit e9637bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
and `ArchiveIterator::from_read_with_encoding` [#90]
1111
* Forward name decode failures in `ArchiveIterator::from_read` and
1212
`ArchiveIterator::from_read_with_encoding` instead of panicking [#91]
13+
* Increase internal used buffersize [#93]
1314

1415
## [0.13.0] - 2022-08-03
1516

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use std::{
6969
slice,
7070
};
7171

72-
const READER_BUFFER_SIZE: usize = 1024;
72+
const READER_BUFFER_SIZE: usize = 16384;
7373

7474
/// Determine the ownership behavior when unpacking the archive.
7575
pub enum Ownership {

0 commit comments

Comments
 (0)