This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Reduce import time for xmlrpclib
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: effbot Nosy List: cesarb, effbot
Priority: normal Keywords: patch

Created on 2001-09-04 02:55 by cesarb, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patxh cesarb, 2001-09-04 02:55 Patch against xmlrpclib.py (CVS rev 1.4)
Messages (2)
msg37474 - (view) Author: Cesar Eduardo Barros (cesarb) Date: 2001-09-04 02:55
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
msg37475 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2001-09-10 13:00
Logged In: YES 
user_id=38376

The statical binding breaks existing user code (some
applications depend on being able to plug in a sloppier
parser than the default).

I've implemented another variant of lazy loading,
which gives a 20x speedup in my test setup.  YMMV,
as usual.

Will appear in a repository near you real soon now.

Thanks /F
History
Date User Action Args
2022-04-10 16:04:24adminsetgithub: 35098
2001-09-04 02:55:36cesarbcreate