[Python-Dev] very bad network performance
schmir at gmail.com
Tue Apr 15 01:28:06 CEST 2008
On Tue, Apr 15, 2008 at 1:19 AM, Guido van Rossum <guido at python.org> wrote:
> But why was imaplib apparently specifying 10MB? Did it know there was
> that much data? Or did it just not want to bother looping over all the
> data in smaller buffer increments (e.g. 64K, which is probably the max
> of what most TCP stacks will give you)?
Well, calling read with a size of 10MB should be possible. The problem is
that this value ended up
inside the recv call, which then did the malloc/realloc calls.
> If I'm right with my hunch that the TCP stack will probably clamp at
> 64K, perhaps we should use min(system limit, max(requested size,
> buffer size))?
yes, this is what I was trying to explain.
> --Guido van Rossum (home page: http://www.python.org/~guido/<http://www.python.org/%7Eguido/>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev