Hi all,
I've currently been working on optimizing the nss package functions
like NSSTrustDomain_TraverseCertificates()
which can be seen at
https://dxr.mozilla.org/mozilla-central/source/security/nss/lib/pki/trustdomain.c?from=NSSTrustDomain_TraverseCertificates#988
and nssPKIObjectCollection_AddInstances() as can be seen at
https://dxr.mozilla.org/mozilla-central/source/security/nss/lib/pki/pkibase.c?case=true&from=nssPKIObjectCollection_AddInstances#827
.
Currently the nss package uses a circular linked list to store certs.
Hence the following functions give a very bad performance of O(n*n) for
adding instances of certs into the list.
Each addition first consists of an addition to the linked list O(n)
followed by a check for duplicates which is performed by the function
add_object_instance.
I'm currently working to migrate the storage of certs to a hash table
rather than a linked list which provides lookups at O(1) rather than the
present lookup of O(n).
The details of this behavior can be found in
https://bugzilla.mozilla.org/show_bug.cgi?id=1253211
Any alternate suggestions to improve and optimize the behavior are welcomed.
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to