]> source.dussan.org Git - nextcloud-server.git/commit
Minor optimizations for saving user personal information
authorCarl Schwan <carl@carlschwan.eu>
Wed, 26 Jan 2022 19:58:39 +0000 (20:58 +0100)
committerCarl Schwan <carl@carlschwan.eu>
Thu, 12 May 2022 19:02:52 +0000 (21:02 +0200)
commiteef973e85ba5e5cc322079ff85a599d42f1334e6
tree23d99edd8f57e07973ae1327a67bab3c47f6b1c1
parenteb45a6ca404524bad6416ba3b3a755f9faa5e9b8
Minor optimizations for saving user personal information

* Remove double hook: the OC_User::changeUser triggers an
OC\AccountManager::userUpdated and the app is already listening to this
signal in its Application definition

* Make createCard not check if an card exists if we already checked
  previously. We also don't try to get the card if the user is disabled
  as we don't use the card in this case

We this change we go from 100 DB requests to 80 DB requests when saving
an user email address.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit c6fd482edf33214a9ad4787e4cac278f871fa7c8)
apps/dav/lib/CardDAV/CardDavBackend.php
apps/dav/lib/CardDAV/SyncService.php
apps/dav/lib/HookManager.php
lib/private/Accounts/AccountManager.php
tests/lib/Accounts/AccountManagerTest.php