[RFC][PATCH]Speed improvement on the http transport: add keepalive support
John A Meinel
john at arbash-meinel.com
Mon Feb 20 21:43:43 GMT 2006
Martin Pool wrote:
> On Thu, 2006-02-16 at 20:33 -0600, John A Meinel wrote:
>> Goffredo Baroncelli wrote:
>> If you are copying code from another project, it generally goes into
>> 'bzrlib.util'.
>> And we used to actually use URLGrabber. I believe we stopped using it
>> because it failed to work properly on Windows. And we preferred having
>> only 1 code path. (I believe Aaron was the one who pushed for this).
>>
>> I think Martin has a branch which would use pyCurl which supports
>> keep-alive and some other good stuff (as long as you have curl installed).
>
> Yes, it's here
>
> http://people.ubuntu.com/~mbp/bzr.mbp.pycurl/
>
> It still needs to be hooked into the test suite but otherwise I think
> it's nearly mergeable.
>
> PyCurl does a few useful things
>
> * dns caching
> * keepalive, including to proxies
> * future potential for overlapped requests and within-request progress
> indications
> * apparently does this well on Windows too
>
> The main downside is that it's another binary dependency, but that's
> possibly more palatable than maintaining our own version of something
> already written so many times. The crucial test would be how it
> compares for speed.
>
I was looking over your code. You have some framework for allowing
multiple transport handlers, but you don't seem to actually have that
hooked up for pycurl.
Further, I would avoid using a global state object (self.curl) inside a
Transport. You don't really need it. It just gives you one less
parameter to _set_cache_headers, and _curl_perform().
Removing it would mean that we could make HttpTransport thread-safe. I
realize this isn't a high priority right now, but I think it is
something we should keep in mind.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060220/f2215992/attachment.pgp
More information about the bazaar
mailing list