On Fri, 2012-11-16 at 12:17 -0500, Zdenek Pavlas wrote: > > replacing and killing of bad bytes with a single call to item.translate() > > Tried that, too. unicode.replace(dict) is surprisingly slow. > With the same test case, this scored some 0.180s
Interesting, assuming you mean unicode.translate. I kind of assumed the multiple replaces would be slower than a single translate. Anyway I added the extra apos replace (but changed nothing else) and the degenerate package testcase of: time python -c 'import yum; x = yum.YumBase(); x.pkgSack.returnPackages(patterns=["widelands"])[0].xml_dump_filelists_metadata() ...was 1.156 vs. 1.054 for Toshio's version (with the to_utf8 in it). But, for the complete createrepo run I got 32.407 which is better than 37.253 :) So I have no complaints with doing it all "in python" :) _______________________________________________ Yum-devel mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/yum-devel
