A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-September/091583.html below:

[Python-Dev] how to debug httplib slowness

[Python-Dev] how to debug httplib slowness [Python-Dev] how to debug httplib slownessAntoine Pitrou solipsis at pitrou.net
Fri Sep 4 13:40:32 CEST 2009
Simon Cross <hodgestar+pythondev <at> gmail.com> writes:
> 
> Well, since the source for _read_chunked includes the comment
> 
>         # XXX This accumulates chunks by repeated string concatenation,
>         # which is not efficient as the number or size of chunks gets big.
> 
> you might gain some speed improvement with minimal effort by gathering
> the read data chunks into a list and then returning "".join(chunks) at
> the end.

+1 for trying this. Given differences between platforms in realloc()
performance, it might be the reason why it goes unnoticed under Linux but
degenerates under Windows.

As a sidenote, it is interesting that even an stdlib module makes this mistake
and acknowledges it without trying to fix it.


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