Skip to content

Optimize do_remove_all_certs_received_by

Function do_remove_all_certs_received_by is inefficient: it removes the items one by one making a lot of unneeded DB reads & writes of the same entry, then calls on_removed_cert multiple times. However do_remove_all_certs_received_by is only called when we know the identity is not member (except in the root call remove_all_certs_received_by) so there is room for a big simplification here.

  • If we want to keep the root call remove_all_certs_received_by, a new method on_removed_all_certs could be added to OnRemovedCert.
  • OnRemovedCert::on_removed_certs has unused arguments (are they optimized out by lto=thin or is lto=fat needed?).
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information