Is xmlrpclib slow?

Skip Montanaro skip at
Thu Sep 27 18:42:22 CEST 2001

    Kalle> [Magnus Lie Hetland about xmlrpclib]
    >> Is it just the machine I'm using that's really slow, or is the
    >> xmlrpclib module a big bottleneck here?

    Kalle> Skip Montanaro about performance problems with xmlrpclib:

I'm still working on that problem.  I've stabilized everything I can so
far.  My next step will be to try upgrading kernels on the slower machine.

Magnus, your problem may just be that you are using a pure Python XML
parser.  I use Fredrik Lundh's sgmlop parser which xmlrpclib will use
automatically if it's available.  I suspect there are other ways to speed up
XML parsing as well.

The other thing to note is that xmlrpclib 1.0b3 (what is delivered with
2.1.1 I think) seems to be much slower than xmlrpclib 0.9.8.  If I modify
sys.path to force import of one or the other, the dump speed changes

    % python
    testing with xmlrpclib 0.9.8
    using FastParser
    410 dumps per second
    106 loads per second
    % PYTHONPATH=/home/skip/misc/python/python2 python
    testing with xmlrpclib 1.0b3
    using SgmlopParser
    229 dumps per second
    94 loads per second

SgmlopParser under 1.0b3 is the same as FastParser under 0.9.8.  There's
another parser available from Pythonware for 1.0b3 that is now called
FastParser.  Presumably it's faster or more robust than the SgmlopParser.

Skip Montanaro (skip at

More information about the Python-list mailing list