[Patches] [ python-Patches-458245 ] Reduce import time for xmlrpclib

noreply@sourceforge.net noreply@sourceforge.net
Mon, 03 Sep 2001 20:03:58 -0700


Patches item #458245, was opened at 2001-09-03 19:55
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=458245&group_id=5470

Category: Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Cesar Eduardo Barros (cesarb)
>Assigned to: Fredrik Lundh (effbot)
Summary: Reduce import time for xmlrpclib

Initial Comment:
This patch reduces the load time for xmlrpclib.py (my
tests show it's about half the load time with the
patch) by not loading xmllib when it's not needed. It
also simplifies getparser() (by chosing the
parser/unmarshaller statically) and avoids declaring
slower parsers/unmarshallers when a faster version is
available.

The indentation is a bit odd, to avoid touching a large
amount of code because of indentation changes (to
improve the readability of the patch). If it is to be
accepted, it might be a good idea to reindent the
affected blocks of code.

The only test made was the trivial one in the module
(getStateName).

The patch is against CVS revision 1.4 of xmlrpclib.py

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=458245&group_id=5470