[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] xmlrpc performance
From: |
Horst Herb |
Subject: |
[Gnumed-devel] xmlrpc performance |
Date: |
Fri, 28 Feb 2003 08:46:06 +0100 |
User-agent: |
KMail/1.5 |
My performance testing as attached below suggests that there is a ~0.05 sec
overhead per call on a P4-1.7GHz when using XML-RPC instead of direct
function calls. You can try it out on your machine with the attached files.
This overhead will increase when we add authentication.
This is quite considerable., It highlichts that this technlogy is only useful
for highest level calls - our design must not allow that more than 10 such
calls per second user space real time are ever neccessary.
In order to not to penalize users with old hardware unneccessarily when they
run all services on a local machine anyway, I would propose the following API
design as demonstrated by this simple example:
if no_xmlrpc
import myserver
def connect():
return xmlrpclib.Server('http://localhost:8000')
if no_xmlrpc:
server = myserver.PersonDB()
else:
server = connect()
server.GetPerson('1')
I am sure you get the drift. We have to make it transparent to the application
whether XML-RPC is used or not - should be an option that is selectable at
run-time. That way, we can have the benefits of both worlds, we a re
future-compatible, we are open to communicate with other modules, but we
still can have maximum performance should we chose it.
Horst
------------------------------------------------------------------------------
address@hidden:~$ python myclient.py 10
Running a timed comparison of xmlrpc via direct function calls:
Each test is run 10 times
direct function calls
time elapsed: 0.000110030174255
XMLRPC, already connected to server
time elapsed: 0.056911945343
XMLRPC, reconnecting each time to server
time elapsed: 0.0517169237137
address@hidden:~$ python myclient.py 100
Running a timed comparison of xmlrpc via direct function calls:
Each test is run 100 times
direct function calls
time elapsed: 0.000619053840637
XMLRPC, already connected to server
time elapsed: 0.491975069046
XMLRPC, reconnecting each time to server
time elapsed: 0.494248986244
address@hidden:~$ python myclient.py 1000
Running a timed comparison of xmlrpc via direct function calls:
Each test is run 1000 times
direct function calls
time elapsed: 0.0076869726181
XMLRPC, already connected to server
time elapsed: 4.84028303623
XMLRPC, reconnecting each time to server
time elapsed: 4.93417906761
myserver.py
Description: Text Data
myclient.py
Description: Text Data
- [Gnumed-devel] xmlrpc performance,
Horst Herb <=