[Yum-devel] [PATCH] Fix main speed issue in to_xml(), slows down new createrepo a lot. BZ 716235.

Toshio Kuratomi a.badger at gmail.com
Thu Nov 15 19:43:36 UTC 2012


On Thu, Nov 15, 2012 at 12:29:52PM -0500, David Malcolm wrote:
> On Thu, 2012-11-15 at 06:02 -0500, Zdenek Pavlas wrote:
> 
> (jumping in mid-thread; sorry)
> 
> Where are the test cases?  Surely this is amenable to unit testing?
> 
If you want some test cases, we could pull the kitchen tests for the
*to_xml() functions.  Be aware that testing these functions requires a lot
of permutations.  There's different data that's possible as input: ascii,
utf-8, latin-1, shift-jis, unicode.  There's different env settings on the
user's system: LC_ALL=en_US.utf-8, LC_ALL=en_US.ISO8859-1, LC_ALL=C.  

> (and if this is really a speed issue, then it's probably worth using
> Cython to optimize this, but only once you've got test coverage, of
> course)
> 
heh, this might no longer be the bottleneck.  The changes we've made have
improved the overall time considerably so there might not be any more hot
loops in python, they might all be in C now. (via list comprehensions,
zip(), map(), set comparisons, etc).

Probably should get some profiling information out of a createrepo run if
we want to optimize more.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20121115/8123eba6/attachment.asc>


More information about the Yum-devel mailing list