Save bunch of memory by not loading file classes in ts elements
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 30 Oct 2008 11:46:26 +0000 (13:46 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 30 Oct 2008 11:47:40 +0000 (13:47 +0200)
- install/remove doesn't need or use file class information at all,
  don't bother loading it, saves a few megs of memory on large transactions

lib/rpmte.c

index 776b923..2e98bb8 100644 (file)
@@ -143,7 +143,7 @@ static void addTE(rpmts ts, rpmte p, Header h,
     p->obsoletes = rpmdsNew(h, RPMTAG_OBSOLETENAME, scareMem);
 
     savep = rpmtsSetRelocateElement(ts, p);
-    p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
+    p->fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, RPMFI_NOHEADER|RPMFI_NOFILECLASS);
     (void) rpmtsSetRelocateElement(ts, savep);
 
     rpmteColorDS(p, RPMTAG_PROVIDENAME);