forked from M-Labs/artiq
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::slice;
|
||||||
use std::io::{self, Read, Write};
|
use std::io::{self, Read, Write, BufWriter};
|
||||||
use proto::*;
|
use proto::*;
|
||||||
use self::tag::{Tag, TagIterator, split_tag};
|
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()));
|
try!(write_u8(writer, tag.as_u8()));
|
||||||
match tag {
|
match tag {
|
||||||
Tag::None => Ok(()),
|
Tag::None => Ok(()),
|
||||||
|
|
Loading…
Reference in New Issue