Is xmlrpclib slow?

Kent Polk kent at goatnospamhill.org
Thu Sep 27 10:45:05 EDT 2001


On Thu, 27 Sep 2001 13:58:14 +0200, Magnus Lie Hetland wrote:
> 
> I've been working on a little server lately, and I've
> been toying with using xmlrpc in it... And just for
> fun, I thought I'd test its performance. Since I'm
> working on a not-quite-up-to-date Sun box, I'm not
> quite sure what processor I have... But it seems reasonable.
> (Not exactly fast, but OK, e.g. about 10000 records
> written to MetaKit takes 1 second.)
... 
> Is it just the machine I'm using that's really slow, or
> is the xmlrpclib module a big bottleneck here?

It can be extremely slow with a lot of tags. I have an application
that transfers a list of records to be inserted in a database. I
first tried sending the data as a list of lists and it took 5
minutes for the server, a 333MHz Ultra 5, to decode the data for
about 500k of data, mostly very small record items. I then used
string.join to join the record lists with a unique separator and
it took about one minute to decode and split the strings back into
records. Then I did similar with the records and it's down to about
3 seconds to decode (one big string) and split the data back into
a list of lists.

So I would recommend that one consider bundling up the data into
a simple data type before sending with xmlrpc.




More information about the Python-list mailing list