Pull Request done.
Over to you now to take or leave as you wish.
My server is now working fine so I'm happy either way.
If anyone's interested in giving the change a try in the meantime then
here's the patch (for v 2.3.6 but should work just the same for 2.3.5 and
2.3.7a).
Only the pool bit is necessary. The addition of commandCount and detailCount
were only to make my gdb session slightly easier and should be harmless.
--- SOGoActiveSyncDispatcher+Sync.m 2016-01-18 16:38:40.000000000 +0000
+++ SOGoActiveSyncDispatcher+Sync.m 2016-02-02 16:42:30.356926415 +0000
@@ -1340,16 +1340,24 @@
id <DOMElement> aCommand, element;
NSArray *allCommands;
int i, j;
+ int commandCount, detailCount;
+ NSAutoreleasePool *pool;
allCommands = (id)[theDocumentElement getElementsByTagName: @"Commands"];
-
- for (i = 0; i < [allCommands count]; i++)
+
+ commandCount = [allCommands count];
+
+ for (i = 0; i < commandCount; i++)
{
aCommand = [allCommands objectAtIndex: i];
aCommandDetails = [aCommand childNodes];
- for (j = 0; j < [(id)aCommandDetails count]; j++)
+ detailCount = [(id)aCommandDetails count];
+
+ for (j = 0; j < detailCount; j++)
{
+ pool = [[NSAutoreleasePool alloc] init];
+
element = [aCommandDetails objectAtIndex: j];
if ([element nodeType] == DOM_ELEMENT_NODE)
@@ -1391,7 +1399,8 @@
*processed = YES;
}
}
- }
+ DESTROY(pool);
+ }
}
}
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Ludovic Marcotte
Sent: 02 February 2016 14:58
To: [email protected]
Subject: Re: [SOGo] ActiveSync Excessive Memory Consumption - Cured
On 2016-02-02 09:27, Raph Weyman wrote:
> The problem I had was with a calender of about 4000 events
> synchronizing to Outlook 2013 which I doubt is particularly a corner
> case
SOGoMaximumSyncWindowSize is honored during events synchronization and
events are only loaded and initialized (which consumes memory) if the window
size isn't reached.
--
Ludovic Marcotte
[email protected] :: +1.514.755.3630 :: http://inverse.ca Inverse
inc. :: Leaders behind SOGo (http://sogo.nu) and PacketFence
(http://packetfence.org)
--
[email protected]
https://inverse.ca/sogo/lists
--
[email protected]
https://inverse.ca/sogo/lists