Take advantage of rpmstrPoolStreq() in rpmdsCompare()
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 21 Sep 2012 12:49:11 +0000 (15:49 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 21 Sep 2012 12:49:11 +0000 (15:49 +0300)
- This gives quite a speedup for dependency checking as within
  transaction, all the dependency sets come from the same pool
  and making this just an integer comparison.

lib/rpmds.c

index 973490f..61e6c64 100644 (file)
@@ -825,7 +825,7 @@ int rpmdsCompare(const rpmds A, const rpmds B)
     int result;
 
     /* Different names don't overlap. */
-    if (!rstreq(rpmdsN(A), rpmdsN(B))) {
+    if (!rpmstrPoolStreq(A->pool, rpmdsNId(A), B->pool, rpmdsNId(B))) {
        result = 0;
        goto exit;
     }