mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
runtime: buffer writes of RPC data.
This improves upload speed ~166×.
This commit is contained in:
parent
557bc4bb56
commit
b4bbf44a0a
@ -1,5 +1,5 @@
|
||||
use std::slice;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::io::{self, Read, Write, BufWriter};
|
||||
use proto::*;
|
||||
use self::tag::{Tag, TagIterator, split_tag};
|
||||
|
||||
@ -98,6 +98,7 @@ unsafe fn send_value(writer: &mut Write, tag: Tag, data: &mut *const ()) -> io::
|
||||
})
|
||||
}
|
||||
|
||||
let writer = &mut BufWriter::new(writer);
|
||||
try!(write_u8(writer, tag.as_u8()));
|
||||
match tag {
|
||||
Tag::None => Ok(()),
|
||||
|
Loading…
Reference in New Issue
Block a user