[components] Performance optimazition for the logins list() method
commit31a4ad1f6e3d2d671c4b9b4278c3f9b1d1ab3c3c
authorBen Dean-Kawamura <bdk@mozilla.com>
Thu, 14 Oct 2021 15:37:34 +0000 (14 11:37 -0400)
committerGrisha Kruglov <grigory@kruglov.ca>
Thu, 14 Oct 2021 17:51:52 +0000 (14 10:51 -0700)
tree61df18236da3d3ad6a0ee0ddc9165d5296459d08
parent0a944924420d9fac81c7dccae38ea87ec6f893ad
[components] Performance optimazition for the logins list() method

This avoids re-uses the same key to decrypt each login.  This avoids
refetching the secure pref and doing the canary check, both of which are
fairly expensive.

Also updated getByBaseDomain() since it was simple to update and had the same issues.
mobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/LoginsCrypto.kt
mobile/android/android-components/components/service/sync-logins/src/main/java/mozilla/components/service/sync/logins/SyncableLoginsStorage.kt