[Yum-devel] repomanage slowness and ts.setVSFlags

Matthew Miller mattdm at mattdm.org
Wed Jul 25 20:38:02 UTC 2007


So, uh, I know Jeff said that this was the wrong thing to do, etc., when
this was last discussed, but the attached patch still speeds up `repomanage
-o` by order of magnitude -- from 99 seconds to 6 seconds on my x86_64 repo,
or 76 seconds to 4 on i386. I notice that createrepo does a similar thing.





-- 
Matthew Miller           mattdm at mattdm.org          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>
-------------- next part --------------
--- repomanage.orig	2007-07-25 16:36:17.000000000 -0400
+++ repomanage	2007-07-25 16:36:21.000000000 -0400
@@ -70,12 +70,14 @@
         fdno = os.open(package, os.O_RDONLY)
     except OSError, e:
         raise Error, "Error opening file %s" % package
+    ts.setVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
     try:
         hdr = ts.hdrFromFdno(fdno)
     except rpm.error, e:
         raise Error, "Error opening package %s" % package
     if type(hdr) != rpm.hdr:
         raise Error, "Error opening package %s" % package
+    ts.setVSFlags(0)
     os.close(fdno)
     return hdr
     


More information about the Yum-devel mailing list