Skip to content

Commit

Permalink
Use the new index key iterator for dependency check hashes
Browse files Browse the repository at this point in the history
In normal transactions this is but a drop in the ocean. However on
rpm -Va, the hashes get rebuilt from scratch on every single package
which on my moderate rpmdb (~2800 packages) testcase results in
103418347 data values fetched and added to dbi sets that are only
thrown away.

With bdb and lmdb this is only a minor optimization but for ndb and sqlite
which can retrieve keys independently, this is a much bigger win. In case
of sqlite, it's a massive one.
  • Loading branch information
pmatilai committed Dec 9, 2019
1 parent cb44765 commit b33397f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/depends.c
Expand Up @@ -938,7 +938,7 @@ static void addIndexToDepHashes(rpmts ts, rpmDbiTag tag,
{
char *key;
size_t keylen;
rpmdbIndexIterator ii = rpmdbIndexIteratorInit(rpmtsGetRdb(ts), tag);
rpmdbIndexIterator ii = rpmdbIndexKeyIteratorInit(rpmtsGetRdb(ts), tag);

if (!ii)
return;
Expand Down

0 comments on commit b33397f

Please sign in to comment.