[issue508157] urllib.urlopen results.readline is slow

2008-04-05 Thread Aren Olson

Aren Olson <[EMAIL PROTECTED]> added the comment:

I can indeed confirm that this change creates a HUGE speed difference.
Using the code found at [1] with python2.5 and apache2 under Ubuntu,
changing the buffer size to 4096 improved the time needed to download
10MB from 15.5s to 1.78s, almost 9x faster. Repeat downloads of the same
file (meaning the server now has the file cached in memory), yield times
of 15.5s and 0.03s, a 500x improvement. When fetching from a server on
the local network, rather than from localhost, these times become 15.5s
and 0.9s in both cases, a 17x speedup. Real-world situations will likely
be a mix of these, however it is safe to say the speed improvement will
be substantial. Adding an option to adjust the buffer size would be very
welcome, though the default value should still be zero, to avoid the
issues already mentioned.

[1] - http://pastebin.ca/973578

--
nosy: +reacocard


Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue508157>

___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2576] httplib read() very slow due to lack of socket buffer

2008-04-07 Thread Aren Olson

New submission from Aren Olson <[EMAIL PROTECTED]>:

This is a reposting of issue 508157, as requested by gvanrossum.

The socket file object in httplib is opened without any buffering
resulting in very slow performance of read().  The specific problem is
in the httplib.HTTPResponse constructor.  It calls sock.makefile() with
a 0 for the buffer size.  changing the buffer size to 4096 improved the
time needed to download 10MB from 15.5s to 1.78s, almost 9x faster.
Repeat downloads of the same file (meaning the server now has the file
cached in memory), yield times of 15.5s and 0.03s, a 500x improvement.
When fetching from a server on the local network, rather than from
localhost, these times become 15.5s and 0.9s in both cases, a 17x
speedup. Real-world situations will likely be a mix of these, however it
is safe to say the speed improvement will be substantial. Adding an
option to adjust the buffer size would be very welcome, though the
default value should still be zero, to avoid the issues already
mentioned in issue 508157.

These speed results were obtained with python2.5 and apache2 under
Ubuntu linux, using the code found here: http://pastebin.ca/973578

--
components: Library (Lib)
messages: 65121
nosy: reacocard
severity: normal
status: open
title: httplib read() very slow due to lack of socket buffer
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2576>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1722344] Thread shutdown exception in Thread.notify()

2009-05-18 Thread Aren Olson

Changes by Aren Olson :


--
nosy: +reacocard

___
Python tracker 
<http://bugs.python.org/issue1722344>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com