Newbie to XML-RPC: looking for advice

Christian Tismer tismer at stackless.com
Fri Jan 13 21:15:05 EST 2006


David Hirschfield wrote:

<server, client, all looks good>

> All the above works fine...but I'm finding the following: while the 
> actual creation and pickling of the objects only takes a millisecond or 
> so, the actual time before the client call completes is a third of a 
> second or more.
> 
> So where's the slowdown? It doesn't appear to be in the 
> pickling/unpickling or object creation, so it has to be in xmlrpc 
> itself...but what can I do to improve that? It looks like xmlrpclib uses 
> xml.parsers.expat if it's available, but are there faster xml libs? 
> Looking at the xmlrpclib code itself, it seems to want to find either: 
> _xmlrpclib from the code in xmlrpclib.py:
> 
> try:
>     # optional xmlrpclib accelerator.  for more information on this
>     # component, contact info at pythonware.com
>     import _xmlrpclib
>     FastParser = _xmlrpclib.Parser
>     FastUnmarshaller = _xmlrpclib.Unmarshaller
> except (AttributeError, ImportError):
>     FastParser = FastUnmarshaller = None

Can you check wether it is actually using expat?
(it can be checked by examining sys.modules, or intercepting
__import__)

I cannot think of a faster parser than expat at the moment.

...

> On the other hand, maybe the slowdown is in twisted.web.xmlrpc? What 
> does that module use to do its work? Is it using xmlrpclib underneath?
> Other xmlrpc libraries that are significantly faster that I should be 
> using instead?

Sorry that this is just a partial answer. I should have more knowledge
about twisted than I actually have.
Hinting to check the imported stuff.

cheers - chris
-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/



More information about the Python-list mailing list