<br><br><div class="gmail_quote">On Mon, Apr 21, 2008 at 8:10 PM, Gregory P. Smith <<a href="mailto:greg@krypto.org">greg@krypto.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><div><br></div><div><br>The 64K hunch is wrong. The system limit can be found using getsockopt(...SO_RCVBUF...). It can easily be (and often is) set to many megabytes either at a system default level or on a per socket level by the user using setsockopt. When the system default is that large, limiting by the system limit would not help the 10mb read case.<br>
</div></div></blockquote><div><br>but it would help in the 100mb read case.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote">
<div><br>Even smaller allocations like 64K cause problems as mentioned in issue 1092502 linking to this twisted <a href="http://twistedmatrix.com/trac/ticket/1079" target="_blank">http://twistedmatrix.com/trac/ticket/1079</a> bug. twisted's solution was to make the string object returned by a recv as short lived as possible by copying it into a StringIO. We could do the same in _fileobject.read() and readline().<br>
</div></div></blockquote><div><br>this approach look reasonable to me.<br><br>- Ralf<br><br></div></div>