Simplistix/buildout-versions — Issue #3: Speedup for _log_requirement()
Author: mgedmin
Created: 2012-02-12 17:35:44+00:00
State: open

Russ Patterson has been working on [a branch to speed up zc.buildout](http://mail.python.org/pipermail/distutils-sig/2012-January/018241.html). While working on that he noticed that a function ([_log_requirement]()) is performing a lot of computation that is then discarded when the logging level is anything higher than DEBUG. This function is also present in `buildout.dumppickedversions` and (I finally get to the point ;)) [buildout-versions](https://github.com/Simplistix/buildout-versions/blob/332070a04c326491ceb983f8ecf346612a564773/src/buildout_versions/__init__.py#L20).

Russ [fixed this in zc.buildout](http://svn.zope.org/zc.buildout/trunk/src/zc/buildout/easy_install.py?rev=124059&r1=122980&r2=124059) and in [buildout.dumppickedversions](http://pypi.python.org/pypi/buildout.dumppickedversions/0.5#id1) and then [compared the run time](http://mail.python.org/pipermail/distutils-sig/2012-January/018268.html) of buildout.dumppickedversions with buildout-versions:

> I just timed a production buildout with zc.buildout 1.5.2 and compared
> buildout.dumppickedversions 0.5 against buildout-versions 1.7.
>
> buildout.dumppickedversions 0.5 = 0m33.449s
> buildout-versions 1.7 = 1m11.667s

He asked me (in private mail) to ping you, since I brought buildout-versions up in the discussion, and he doesn't use it personally, so I'm pinging you. ;)

I'll try to create a github pull request soon.