the size is not bytes but objects

and objects were byte arrays (typically 8KB).

limit it to 64, so typically not more than 512kb is used. doesn't change
the max speed when downloading on localhost, and decreases the RSS usage
with slow clients.
This commit is contained in:
Дамјан Георгиевски 2018-07-13 09:48:39 +02:00
parent 9a56bcb1a0
commit e8d3481108

View file

@ -19,7 +19,7 @@ type BlockingSender = futures::sink::Wait<Sender>;
pub fn stream_tar_in_thread(path: PathBuf) -> Stream {
let (writer, stream) = StreamWriter::new(4 * 1024 * 1024);
let (writer, stream) = StreamWriter::new(64);
thread::spawn(move || {
let mut a = tar::Builder::new(writer);