mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #33549 from nextcloud/enh/perfopt-for-carddav
Performance optimisation for carddav backend blob data read
This commit is contained in:
commit
431144c722
1 changed files with 6 additions and 1 deletions
|
|
@ -933,6 +933,12 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
|||
$cardData = stream_get_contents($cardData);
|
||||
}
|
||||
|
||||
// Micro optimisation
|
||||
// don't loop through
|
||||
if (strpos($cardData, 'PHOTO:data:') === 0) {
|
||||
return $cardData;
|
||||
}
|
||||
|
||||
$cardDataArray = explode("\r\n", $cardData);
|
||||
|
||||
$cardDataFiltered = [];
|
||||
|
|
@ -956,7 +962,6 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
|||
|
||||
$cardDataFiltered[] = $line;
|
||||
}
|
||||
|
||||
return implode("\r\n", $cardDataFiltered);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue