[UGLY HACK] Proof of concept multipart/byteranges support and connection sharing

Martin Pool mbp at canonical.com
Tue May 23 07:29:47 BST 2006


On 19 May 2006, Michael Ellerman <michael at ellerman.id.au> wrote:

> The obvious optimisation for bzr at the moment is to make readv() do a
> proper[1] HTTP range request. So last night I hacked up a _really_
> horrible implementation, just to see what sort of speed improvement that
> might get us.

That's very cool; I hope we can get it in when it's less hacky.

> [2] Unfortunately we're creating about 15 PyCurlTransport() objects, so
> to see much improvement we have to share the Curl() object globally.
> Yuck. Also it seems (??) you can't unset pycurl.RANGE/NOBODY, so we have
> to have three Curl() objects, one for GET, one for HEAD and one for GET
> + Range.

No, you should be able to do 

  curl.setopt(pycurl.NOBODY, 0)

to turn it off - ie to revert from a HEAD to a GET request.  And
similarly for Range, I'd expect you can set it to an empty string or
None to turn it off.

-- 
Martin Pool




More information about the bazaar mailing list