perf(calendar): Disable custom properties for individual calendar events

Save a query per event stored in the calendar and at least on the
production instance, there is no entries in the table for the events.

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
This commit is contained in:
Carl Schwan 2025-08-14 11:11:05 +02:00 committed by backportbot[bot]
parent e5c2be1f54
commit 1d21f04d7b

View file

@ -9,6 +9,7 @@ namespace OCA\DAV\DAV;
use Exception;
use OCA\DAV\CalDAV\Calendar;
use OCA\DAV\CalDAV\CalendarObject;
use OCA\DAV\CalDAV\DefaultCalendarValidator;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\FilesPlugin;
@ -223,6 +224,11 @@ class CustomPropertiesBackend implements BackendInterface {
$this->cacheDirectory($path, $node);
}
if ($node instanceof CalendarObject) {
// No custom properties supported on individual events
return;
}
// First fetch the published properties (set by another user), then get the ones set by
// the current user. If both are set then the latter as priority.
foreach ($this->getPublishedProperties($path, $requestedProps) as $propName => $propValue) {