• Jeremy Hylton's avatar
    Send HTTP requests with a single send() call instead of many. · 8531b1b2
    Jeremy Hylton yazdı
    The implementation now stores all the lines of the request in a buffer
    and makes a single send() call when the request is finished,
    specifically when endheaders() is called.
    
    This appears to improve performance.  The old code called send() for
    each line.  The sends are all short, so they caused bad interactions
    with the Nagle algorithm and delayed acknowledgements.  In simple
    tests, the second packet was delayed by 100s of ms.  The second send was
    delayed by the Nagle algorithm, waiting for the ack.  The delayed ack
    strategy delays the ack in hopes of piggybacking it on a data packet,
    but the server won't send any data until it receives the complete
    request.
    
    This change minimizes the problem that Nagle + delayed ack will cause
    a problem, although a request large enough to be broken into two
    packets will still suffer some delay.  Luckily the MSS is large enough
    to accomodate most single packets.
    
    XXX Bug fix candidate?
    8531b1b2
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
PLAN.txt Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...