Use NSString instances as keys rather than NSNumber, to work around a performance issue with GNUstep < 1.24

This commit is contained in:
Wolfgang Sourdeau
2012-10-09 16:39:24 -04:00
parent c9dad4cab6
commit 5b7cbb6350
3 changed files with 52 additions and 56 deletions

View File

@@ -26,6 +26,7 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <NGExtensions/NSObject+Logs.h>
#import <NGExtensions/NSObject+Values.h>
#import <NGImap4/NGImap4Client.h>
#import <NGImap4/NGImap4Connection.h>
#import <NGImap4/NGImap4EnvelopeAddress.h>
@@ -366,21 +367,21 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
- (uint64_t) objectVersion
{
uint64_t version = ULLONG_MAX;
NSNumber *uid, *changeNumber;
NSString *uid, *changeNumber;
uid = [(MAPIStoreMailFolder *)
container messageUIDFromMessageKey: [self nameInContainer]];
if (uid)
{
changeNumber = [(MAPIStoreMailFolder *) container
changeNumberForMessageUID: uid];
changeNumberForMessageUID: uid];
if (!changeNumber)
{
[self warnWithFormat: @"attempting to get change number"
@" by synchronising folder..."];
[(MAPIStoreMailFolder *) container synchroniseCache];
changeNumber = [(MAPIStoreMailFolder *) container
changeNumberForMessageUID: uid];
changeNumberForMessageUID: uid];
if (changeNumber)
[self logWithFormat: @"got one"];
else