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