[issue11089] ConfigParser 50x slower in 2.7

Raymond Hettinger report at bugs.python.org
Wed Feb 2 02:46:45 CET 2011


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Commenting-out the ``c.set(section,"item#%d"%(i),str(i))`` calls shows that that is not where the problem lies for the ConfigParser() class.
The issue seems confined to ConfigParser.get().

The  RawConfigParser() class doesn't seem to have the same issue.

Looking at the 2.7 code for ConfigParser.get() shows that it is doing a lot more than just getting.  For example, it does a full copy of defaults dictionary on every call !?

I'll look at it more shortly.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11089>
_______________________________________


More information about the Python-bugs-list mailing list