bzr log http+urllib does not work, http+pycurl is too slow

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Dec 12 18:22:24 GMT 2007


>>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:

    john> Vincent Ladeuil wrote:
    >>>>>>> "bialix" == Alexander Belchenko <bialix at ukr.net> writes:
    >> 
    bialix> Aaron Bentley пишет:
    >> >> Vincent Ladeuil wrote:
    >> >>> Hey ! List ! What do *you* think ?
    >> >> 
    >> >> I think that if we're trying to use packs and the http server doesn't
    >> >> support ranges, it might be nice to warn the user.  That way, people
    >> >> won't just blame it on Bazaar.
    >> 
    bialix> Completely agree here.
    >> 
    >> 
    >> Something like:
    >> 
    >> if pending > 1024 * 1024:
    >> # Warn only above a threshold
    >> trace.warning("Your http server can't handle ranges,"
    >> " bzr will be slower (%s useless bytes not requested)",
    >> pending)
    >> 
    >> ?
    >> 
    >> Note that message may be slightly wrong since I have no easy way
    >> to check the useless bytes at the beginning of the file.
    >> 
    >> Vincent
    >> 
    >> 

    john> Can't you just see that you got a 200 response back for
    john> a range request, rather than a 206?

Hmmm, not the right layer for that.

    john> Also, I would recommend including at least the
    john> http://host portion of the URL, 

I'd like to too, but all I have here is the body response, so no
url.. a status, an http version (but I'm not sure it's 100% right
if proxies are involved), the headers and the bytes (well, the
remaining ones).

    john> and only issuing 1 warning per server. (Rather than
    john> possibly on every request.)

Ghaaa, even more not the right layer ;-) You don't want to turn
that into a 100 lines patch don't you ?

That will not occur on every request, only the big ones and then
only if there is more than 1M remaining (we can raise that
still), I can easily emit the warning only once and then using
-Dhttp will give more details (even that may be overkill since
the mutter will still report all occurrences).

I'd prefer to go that route if that could help us get a better
understanding of who is really affected by the problem.

This may look less important than a traceback (and it is) but it
may be worth getting feedback.

if first_time and pending > 1024 * 1024:
     # Warn only above a threshold and only once
     first_time = False
     trace.warning("Your http server can't handle ranges,"
                   " bzr will be slower (%s useless bytes not requested)\n"                        "Please report to bazaar at lists.canonical.com",
                   pending)

    Vincent



More information about the bazaar mailing list