This repository was archived by the owner on Oct 18, 2022. It is now read-only.
This repository was archived by the owner on Oct 18, 2022. It is now read-only.
Very slow download #77
Open
Description
xml-rs is freaking slow so that it slows down download rates for any connection with more than like 1 MBit/s (even locally!).
I successfully worked around that by implementing and using a Transport
wrapper that just adds buffering to the stream:
struct BufTransport {
inner: RequestBuilder,
}
impl Transport for BufTransport {
type Stream = BufReader<<RequestBuilder as Transport>::Stream>;
fn transmit(self, request: &Request<'_>) -> Result<Self::Stream, Box<dyn Error + Send + Sync>> {
self.inner.transmit(request).map(BufReader::new)
}
}
(RequestBuilder
could be a generic Read
of course)
As long as xml-rpc-rs sticks with xml-rs, I guess it's a good idea to use a BufReader
in general. I can prepare a pull request if you like.
Metadata
Metadata
Assignees
Labels
No labels