summaryrefslogtreecommitdiff
path: root/lib/certdb/certdb.c
diff options
context:
space:
mode:
authorDana Keeler <dkeeler@mozilla.com>2019-03-20 13:10:37 -0700
committerDana Keeler <dkeeler@mozilla.com>2019-03-20 13:10:37 -0700
commitab43d91dae23e93f0bcd8cf2d91800fef4da5090 (patch)
tree6abb2789839a99177ca4749a68bec58a2f6082d4 /lib/certdb/certdb.c
parent573ff4806bb79cb872ad15220c4c35cc52b41f94 (diff)
downloadnss-hg-ab43d91dae23e93f0bcd8cf2d91800fef4da5090.tar.gz
Bug 1533616 - improve sdb_GetAttributeValueNoLock so it only executes one sqlite statement per call r=jcj
Summary: Prior to this change, sdb_GetAttributeValueNoLock would execute n sqlite queries, where n is the number of elements in its input array. As part of this change, sftk_updateMacs and sftk_updateEncrypted had to be updated to operate on one attribute at a time (note that this does not regress the performance of those functions because the code was already running two sqlite queries per attribute - this just means this change didn't improve the performance of those functions). Previously, these functions would try to obtain an array of various attributes for the given object id. If no such attribute was found, they would ignore these errors and just expect sdb_GetAttributeValueNoLock to have properly populated its output data regardless. The solution is to perform the same operation on each attribute one at a time, and continue to the next if a given attribute isn't found. Test Plan: https://treeherder.mozilla.org/#/jobs?repo=nss-try&revision=1b44b7588cb9a6806701394c08bf64d13f84b982 Reviewers: jcj Reviewed By: jcj Bug #: 1533616 Differential Revision: https://phabricator.services.mozilla.com/D23389
Diffstat (limited to 'lib/certdb/certdb.c')
0 files changed, 0 insertions, 0 deletions