Fix for excessive memory usage on mailboxes with thousands of folders

This commit is contained in:
leecher1337
2023-10-11 21:02:24 +02:00
parent 81f2d88db3
commit 063fb2be3d

View File

@@ -2627,17 +2627,17 @@ FIXME
// We first check of any of the collections we want to sync are already
// in an other sync process. If that's the case, we do not do anything
// and we return immediately. So we'll let the other sync process terminate
globalMetadata = [self globalMetadataForDevice];
for (j = 0; j < [allCollections count]; j++)
{
aCollection = [allCollections objectAtIndex: j];
globalMetadata = [self globalMetadataForDevice];
key = [NSString stringWithFormat: @"SyncRequest+%@", [[[(id)[aCollection getElementsByTagName: @"CollectionId"] lastObject] textValue] stringByUnescapingURL]];
if (!([[globalMetadata objectForKey: key] isEqual: processIdentifier]))
{
if (debugOn)
[self logWithFormat: @"EAS - Discard response %@", [self globalMetadataForDevice]];
[self logWithFormat: @"EAS - Discard response %@", globalMetadata];
[output appendString: @"<Status>13</Status>"];
[output appendString: @"</Sync>"];