Some CentOS 5 (or Fedora) users may have tried the new C metadata parser for yum, which is significantly faster than the Python-based parser for metadata. Yesterday, I have backported the C metadata parser to yum 2.4 for CentOS 4. It requires a relatively unintrusive patch against yum and a patch against yum-metadata-parser 1.1.0.

Of course, we all want benchmarks :). This is yum on CentOS 4 with the default repositories:

# yum clean all
# time yum whatprovides /bin/ls
[...]
real    0m45.158s
user    0m34.600s
sys     0m0.540s

and with the C metadata parser:

# yum clean all
# time yum whatprovides /bin/ls
[...]
real    0m15.580s
user    0m3.950s
sys     0m0.620s

Looking at the user/sys values, the actual CPU time spent on yum is 35.1 seconds versus 4.6 seconds.

Update: there's a patch for CentOS 3 too. Testing packages are now available through the CentOS Testing repository.