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.

Update all backends to allow for NULL set in the index retrieve to
signal key-only retrieval.
  • Loading branch information
pmatilai committed Dec 5, 2019
1 parent 16d9d3a commit d3b063e
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 d3b063e

Please sign in to comment.