Curt Hagenlocher <[EMAIL PROTECTED]> added the comment:
At least in 2.5.2, there appear to be only two places in the standard
library where an arbitrary and unchecked size is passed directly to
_socketobject.recv. _fileobject.read is one such place and the other
is in logging/config.py. In both cases, the pattern is something like
while len(data) < size:
data = data + sock.recv(size - len(data))
Of course, the same pattern may exist in any number of instances of
user code that performs a socket.recv, and all of these would be
subject to the same memory thrashing problem that originally beset
imaplib.
As such, I now agree with Ralf that the fix ultimately belongs in
_socketobject. However, deploying a fix for 2.5.2 is probably easier
if it's in socket.py than if it requires a recompile.
----------
title: socket._fileobject.read(n) should ignore _rbufsize when 1 -> performance
problem in socket._fileobject.read
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2632>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com