propagate from branch 'ca.inverse.sogo.1_3_12' (head 15c306f9d11152fee321b11e184bc75e9e2be6f8)
to branch 'ca.inverse.sogo' (head 0314a56a186d909c3c83333916d6b43946976a9f) Monotone-Parent: 0314a56a186d909c3c83333916d6b43946976a9f Monotone-Parent: 15c306f9d11152fee321b11e184bc75e9e2be6f8 Monotone-Revision: b1c3c4abdd41b8895de8a28a2a5fe6ce0af01caf Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-01-27T15:23:19 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
0ba25b4cd5
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
<<<<<<< variant A
|
||||||
|
2012-01-27 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||||
|
(bareFetchFields: ...) - we now cache the returned
|
||||||
|
results - just like for fetchFields:...
|
||||||
|
|
||||||
|
* SoObjects/Appointments/SOGoAppointmentFolderObject.m
|
||||||
|
(_folderCalenars) - we now ask for the c_content and use
|
||||||
|
a local autorelease pool to avoid consuming too much memory
|
||||||
|
|
||||||
|
>>>>>>> variant B
|
||||||
2012-01-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2012-01-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* OpenChange/MAPIStoreCommonViewsContext.[hm],
|
* OpenChange/MAPIStoreCommonViewsContext.[hm],
|
||||||
|
@ -26,6 +38,8 @@
|
||||||
(+listContextsForUser:inMemCtx:): new individual method invoked by
|
(+listContextsForUser:inMemCtx:): new individual method invoked by
|
||||||
the above. Overridden by concrete subclasses.
|
the above. Overridden by concrete subclasses.
|
||||||
|
|
||||||
|
####### Ancestor
|
||||||
|
======= end
|
||||||
2012-01-26 Ludovic Marcotte <lmarcotte@inverse.ca>
|
2012-01-26 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
* SoObjects/SOGo/LDAPSource.{h,m} - now honor
|
* SoObjects/SOGo/LDAPSource.{h,m} - now honor
|
||||||
|
|
|
@ -559,6 +559,11 @@ static NSNumber *sharedYes = nil;
|
||||||
else
|
else
|
||||||
records = [NSArray array];
|
records = [NSArray array];
|
||||||
|
|
||||||
|
if ([self _checkIfWeCanRememberRecords: fields])
|
||||||
|
{
|
||||||
|
[self _rememberRecords: records];
|
||||||
|
}
|
||||||
|
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* SOGoAppointmentFolderObject.m - this file is part of SOGo
|
/* SOGoAppointmentFolderObject.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Inverse inc.
|
* Copyright (C) 2010-2012 Inverse inc.
|
||||||
*
|
*
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
*
|
*
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
|
#import <Foundation/NSAutoreleasePool.h>
|
||||||
#import <Foundation/NSCalendarDate.h>
|
#import <Foundation/NSCalendarDate.h>
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
|
@ -50,7 +51,7 @@ static NSArray *contentFields = nil;
|
||||||
if (!contentFields)
|
if (!contentFields)
|
||||||
contentFields = [[NSArray alloc] initWithObjects: @"c_name", @"c_version",
|
contentFields = [[NSArray alloc] initWithObjects: @"c_name", @"c_version",
|
||||||
@"c_lastmodified", @"c_creationdate",
|
@"c_lastmodified", @"c_creationdate",
|
||||||
@"c_component", nil];
|
@"c_component", @"c_content", nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
|
@ -181,6 +182,7 @@ static NSArray *contentFields = nil;
|
||||||
NSArray *records;
|
NSArray *records;
|
||||||
NSMutableArray *calendars;
|
NSMutableArray *calendars;
|
||||||
SOGoCalendarComponent *component;
|
SOGoCalendarComponent *component;
|
||||||
|
NSAutoreleasePool *pool;
|
||||||
int count, max;
|
int count, max;
|
||||||
iCalCalendar *calendar;
|
iCalCalendar *calendar;
|
||||||
NSString *name;
|
NSString *name;
|
||||||
|
@ -188,8 +190,19 @@ static NSArray *contentFields = nil;
|
||||||
records = [self _fetchFolderRecords];
|
records = [self _fetchFolderRecords];
|
||||||
max = [records count];
|
max = [records count];
|
||||||
calendars = [NSMutableArray arrayWithCapacity: max];
|
calendars = [NSMutableArray arrayWithCapacity: max];
|
||||||
|
pool = nil;
|
||||||
|
|
||||||
|
// This can consume a significant amount of memory so
|
||||||
|
// we use a local autorelease pool to avoid running
|
||||||
|
// out of memory.
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
|
if (count % 100 == 0)
|
||||||
|
{
|
||||||
|
RELEASE(pool);
|
||||||
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
name = [[records objectAtIndex: count] objectForKey: @"c_name"];
|
name = [[records objectAtIndex: count] objectForKey: @"c_name"];
|
||||||
component = [folder lookupName: name
|
component = [folder lookupName: name
|
||||||
inContext: context
|
inContext: context
|
||||||
|
@ -202,6 +215,8 @@ static NSArray *contentFields = nil;
|
||||||
@" be listed here", name];
|
@" be listed here", name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RELEASE(pool);
|
||||||
|
|
||||||
return calendars;
|
return calendars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue