[MERGE] A hack to make urllib not call recv(1) lots and lots.
andrew at canonical.com
Mon Mar 17 15:31:23 GMT 2008
John Arbash Meinel wrote:
> Well, you could always use 'netem' to configure a high latency link on
> your own computer. I've used it before when testing stuff like 'bzr push'.
> Add 50ms latency to the loopback (100ms round-trip ping time):
> sudo tc qdisc add dev lo root netem delay 50ms
> Restore it back to normal
> sudo tc qdisc del dev lo root
I've used your recipe, and I've just repeated my experiments from last night.
I also followed Robert's suggestion, and bumped the buffering up to 64kB
(updated patch attached for completeness).
Here's unpatched bzr.dev, run twice:
And here's my hack:
So it appears it *does* make a measurable improvement.
FWIW, the branch I'm using can also be found at
More information about the bazaar