mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
performance optimisation for carddav backend blob data read
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
1405b7a8ca
commit
61b55c88da
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