[issue4336] Fix performance issues in xmlrpclib

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: note, this has been ported to Py3k in http://svn.python.org/view? view=revrev=68458 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4336

[issue4336] Fix performance issues in xmlrpclib

2009-01-09 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Checked in revision: 68458 and revision: 68459 -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4336

[issue4336] Fix performance issues in xmlrpclib

2009-01-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Reopening this, since I am not entirely happy with the implementation that was checked in. Please see my comments from Dec 5th onwards. -- status: pending - open ___ Python tracker

[issue4336] Fix performance issues in xmlrpclib

2008-12-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: Please consider applying this patch. It moves the logic handling of non-string message_body inside of endheaders(), allowind clients of HTTPConnection to substitute endheader();send(data) with endheaders(data) without fear. Added

[issue4336] Fix performance issues in xmlrpclib

2008-12-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: In light of my previous patch, here is a an improvement to urllib.py and logging that uses endheaders(body) Added file: http://bugs.python.org/file12283/htmllibclients.patch ___ Python tracker

[issue4336] Fix performance issues in xmlrpclib

2008-12-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: I think it would have been better to have endheaders() (and then perhaps _send_output()) deal with the non-string (i.e. filebuffer) case, so that endheaders(body) is semantically equivalent to endheaders(); send(body). The version

[issue4336] Fix performance issues in xmlrpclib

2008-12-01 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: Really? Works for me. Here is a simple patch where we leave the read buffering. passes test_xmlrpclib.py and test_httplib.py Added file: http://bugs.python.org/file12178/xmlrpc_1.patch ___ Python

[issue4336] Fix performance issues in xmlrpclib

2008-12-01 Thread Simon Cross
Changes by Simon Cross [EMAIL PROTECTED]: -- nosy: +hodgestar ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4336 ___ ___ Python-bugs-list mailing list

[issue4336] Fix performance issues in xmlrpclib

2008-12-01 Thread Jeremy Hylton
Jeremy Hylton [EMAIL PROTECTED] added the comment: I submitted r67442, which combines the headers and body in a single send() call. We should look at the buffering issue now, although I probably won't have any time to check on it until Friday. ___ Python

[issue4336] Fix performance issues in xmlrpclib

2008-11-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: Guido pointed out the problem with _fileobject.readline() being followed by socket.recv() if readline uses read buffering. xmlrpclib.py was attempting to directly use the underlying socket, although in actual fact it never did,

[issue4336] Fix performance issues in xmlrpclib

2008-11-28 Thread Jeremy Hylton
Jeremy Hylton [EMAIL PROTECTED] added the comment: I did the simple part of the patch, where the request and headers are sent at the same time. The applied patch didn't pass the test suite, and I want to think about the buffering change a bit more. It's definitely tricky. Jeremy On Fri, Nov

[issue4336] Fix performance issues in xmlrpclib

2008-11-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: I like the suggestion of having endheaders() accept any extra data. I have uploaded a new patch which implements this idea. It simplifies things a lot. The issue with the read buffer size is still open. I have sent an email to

Re: [issue4336] Fix performance issues in xmlrpclib

2008-11-26 Thread Jeremy Hylton
I think we're making progress, but I'm still not sure about the new httplib api. My current worry is that endheaders() behaves very differently when send_data is false. My chief concern is that the __state variable is going to indicate that the request has been sent when we're really depending

[issue4336] Fix performance issues in xmlrpclib

2008-11-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: I have addressed some issues mentioned: 1) I have retained the _send_output() method. 2) the endheaders() method now takes an optional argument, send_data that defaults to True. It also returns any unsent data as a string. This

[issue4336] Fix performance issues in xmlrpclib

2008-11-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: Sorry, I meant : you may have concerns regarding point 2) above ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4336 ___

[issue4336] Fix performance issues in xmlrpclib

2008-11-24 Thread Jeremy Hylton
Jeremy Hylton [EMAIL PROTECTED] added the comment: This patch makes sense in principle, but some of the details need to change. The _send_output() method is used by some clients, merely because it can be used :-(. It's fairly easy to preserve this API for backwards compatibility. I am also

[issue4336] Fix performance issues in xmlrpclib

2008-11-24 Thread Jeremy Hylton
Jeremy Hylton [EMAIL PROTECTED] added the comment: Just wanted to mention that the best solution is to update as much code as possible to use HTTPConnection instead of HTTP. I'm not sure how easy it is to do for xmlrpclib, since it exposes methods like send_content(). I guess we can preserve

Re: [issue4336] Fix performance issues in xmlrpclib

2008-11-24 Thread Jeremy Hylton
Actually, the patch doesn't work :-). The httplib API allows you to pass a file or a string for the body of the request. The getheaderdata() + body case only works for the string. Easy to fix, but I worry that he still run into Nagle problems with the file case, which was presumably added for

[issue4336] Fix performance issues in xmlrpclib

2008-11-24 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: -- nosy: +haypo ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4336 ___ ___ Python-bugs-list mailing list

[issue4336] Fix performance issues in xmlrpclib

2008-11-21 Thread Kristján Valur Jónsson
Kristján Valur Jónsson [EMAIL PROTECTED] added the comment: Just a thought here: Maybe it would be better just to change socket._fileobject to always use a minimum of 8k readbuffer for readline() just as read() already does. The read() documentation states that recv(1) is very inefficient,

[issue4336] Fix performance issues in xmlrpclib

2008-11-17 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson [EMAIL PROTECTED]: There are two performance problems in xmlrpclib.py: POST requests use two send() calls, one to send the headers and one to send the data. This can invoke the Nagle/Delayed ACK performance problem. On many socket implementations