[Python-Dev] very bad network performance (original) (raw)

A.M. Kuchling amk at amk.ca
Mon Apr 14 21:17:25 CEST 2008


On Mon, Apr 14, 2008 at 11:10:12AM -0700, Curt Hagenlocher wrote:

while True: left = size - buflen ! recvsize = max(self.rbufsize, left) data = self.sock.recv(recvsize)

What version is this patch against? (The last 2.5 release, maybe?) The max() in the above line should be min(), because you want to use the smaller number of the buffer size and the # of remaining bytes to read, not the larger. This code is using min() in both 25-maint and trunk.

--amk



More information about the Python-Dev mailing list