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 simplifies any code wishing to send more data. 3) The old HTTP class needs no changes anymore. 4) I've fixed the test_xmlrpc.py test case to run all the tests on windows. The old concern with "WSAEWOULDBLOCK" seems to be no longer valid. 5) concatenating the result from endheaders() with the request body is valid, in xmlrpclib, because the assumption has already been made in send_content() that request_body is a string (str(len(request_body)). However, in httplib's request() method, we now special case this. I don't want to complicate the code for what appears to be a rare case.
I chose not to mess with xmlrpclib and make it continue to use the old HTTP class in order to minimise the extent of this patch. A simple and clear performance patch has in my experience a much greater chance of finding its way into the codebase than a more extensive rewrite :) You may have concerns regarding point 3 above, and I am open to suggestions. Now, what remains is the question of the read buffering for the socket fileobject. Do you think that it is feasible to simply change the default read buffering for fileobjects to use buffering for readline() same as they do for read()? Then we wouldn't need the second half of this patch and we could make a separate "socket" performance patch. Added file: http://bugs.python.org/file12127/xmlrpc.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com