From 2c4af4bb8fb0ad9574c6bb7407827136b29351ca Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 16 Jun 2009 21:30:46 +0000 Subject: [PATCH] Monotone-Parent: 7a110f21e21ad564421e79c922f4bf78dc6f1846 Monotone-Revision: 59ea344b9668f4a704c43de3039620c216c5a53f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-06-16T21:30:46 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/Appointments/SOGoCalendarComponent.m | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1c56c961f..10e275524 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-06-16 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoCalendarComponent.m (-valuesForKeys:) + overriden method to speed up PROPFIND requests. + 2009-06-15 Wolfgang Sourdeau * SoObjects/SOGo/NSArray+Utilities.m (-hasRangeIntersection): diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 5930260d1..1572f152b 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -1013,4 +1013,20 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence, NSStr return [self component: YES secure: NO]; } +/* Overriding this method dramatically speeds up PROPFIND request, but may + otherwise be a bad idea... Wait and see. */ +- (NSDictionary*) valuesForKeys: (NSArray*)keys +{ + NSMutableDictionary *values; + + values = [NSMutableDictionary dictionaryWithCapacity: [keys count]]; + [values setObject: [self davCreationDate] forKey: @"davCreationDate"]; + [values setObject: [self davContentLength] forKey: @"davContentLength"]; + [values setObject: [self davLastModified] forKey: @"davLastModified"]; + [values setObject: @"text/calendar" forKey: @"davContentType"]; + [values setObject: [self baseURL] forKey: @"davURL"]; + + return values; +} + @end