From 90cc0454a77e5715c698044bb6548f92a7d7b344 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 14 Aug 2025 11:11:05 +0200 Subject: [PATCH] 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 --- apps/dav/lib/DAV/CustomPropertiesBackend.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index f3fff11b3da..4087c45f6c6 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -10,6 +10,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; @@ -224,6 +225,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) {