summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-05-02 07:26:52 +0000
committerGregory P. Smith <greg@mad-scientist.com>2008-05-02 07:26:52 +0000
commitf8cc64017ca0f33b1e21b1c9c9f5f30ebdc4da31 (patch)
tree95a9a74e85ba4b09ef95e1c9dad2de5fba56076b /Python/ast.c
parentb457ddaff2094a0ec02176184beb74f600178ed4 (diff)
downloadcpython-git-f8cc64017ca0f33b1e21b1c9c9f5f30ebdc4da31.tar.gz
This should fix issue2632. A long description of the two competing
problems is in the bug report (one old, one recently introduced trying to fix the old one). In short: buffer data during socket._fileobject.read() and readlines() within a cStringIO object instead of a [] of str()s returned from the recv() call. This prevents excessive memory use due to the size parameter being passed to recv() being grossly larger than the actual size of the data returned *and* prevents excessive cpu usage due to looping in python calling recv() with a very tiny size value if min() is used as the previous memory-use bug "fix" did. It also documents what the socket._fileobject._rbufsize member is actually used for. This is a candidate for back porting to 2.5.
Diffstat (limited to 'Python/ast.c')
0 files changed, 0 insertions, 0 deletions