i just wrote a server and client for xmlrpc test. if server and client run in the same machine, everything is fine. but if server and client run in different machine, the speed is unbearably slow. i tried several times, and the approx time is about 18.5 sec to invoke server.test() 5 times. i had turned off the firewall in windows before running those tests.
but what interesting is, if i run the server in a FreeBSD machine, the speed boosts up to less than 1 sec to invoke server.test() 5 times. approx 20 times faster. any suggestions? thanks in advance. here is my source code. ############# server.py ############# from SimpleXMLRPCServer import SimpleXMLRPCServer import SocketServer port = 31281 a = 1 def test(): global a a += 1 print a return a def main(): # Create server print 'listening at port', port server = SimpleXMLRPCServer(("", port)) server.register_introspection_functions() server.register_function(test) server.serve_forever() if __name__ == '__main__': main() ############# client.py ############# import xmlrpclib from datetime import datetime server = xmlrpclib.Server("http://%s:%d" % ('192.168.0.92', 31281)) start = datetime.now() print server.test() print server.test() print server.test() print server.test() print 'total: ', datetime.now() - start -- Best Regards, Leo Jay
-- http://mail.python.org/mailman/listinfo/python-list