A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078628.html below:

[Python-Dev] very bad network performance

[Python-Dev] very bad network performanceRalf Schmitt schmir at gmail.com
Mon Apr 14 23:29:21 CEST 2008
On Mon, Apr 14, 2008 at 8:10 PM, Curt Hagenlocher <curt at hagenlocher.org>
wrote:

> On Mon, Apr 14, 2008 at 9:12 AM, Ralf Schmitt <schmir at gmail.com> wrote:
> >
> > I've tracked it down to this change:
> > http://hgpy.de/py/release25-maint/rev/e9446c6ab3cd
> > this is svn revision 61009.
> > [...]
> > self._rbufsize if 1, and so the code reads one byte at a time
>
> The change is correct, but exposes a flaw earlier in the same method.
> "_rbufsize == 1" represents a request to buffer "by line", which is
> clearly irrelevant in this context.  A request to read n bytes should
> just use the default buffer size if buffering "by line".  Sample patch
> is attached.
>

Sorry to reply on the mailing list. But this change is wrong.
e.g. if you're using a buffer size of 16 bytes and try to read 256 bytes, it
should call recv with a value of 256 and not call recv 16 times with a value
of 16.
However, there should be an upper limit (as shown by the imap bug).

Regards,
- Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080414/34506a5b/attachment.htm 
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4