Make our appendCharacter: method faster by not creating and throwing away a string every time—instead, use CF to append the character directly. This, in turn, makes our Base64 code much faster.
1.1 --- a/Common/Source/NSMutableStringAdditions.m Mon Feb 08 08:09:27 2010 -0800
1.2 +++ b/Common/Source/NSMutableStringAdditions.m Mon Feb 08 08:10:56 2010 -0800
1.3 @@ -14,9 +14,7 @@
1.4 @implementation NSMutableString (GrowlAdditions)
1.5
1.6 - (void) appendCharacter:(unichar)ch {
1.7 - NSString *tmp = [[NSString alloc] initWithCharactersNoCopy:&ch length:1U freeWhenDone:NO];
1.8 - [self appendString:tmp];
1.9 - [tmp release];
1.10 + CFStringAppendCharacters((CFMutableStringRef)self, &ch, /*numChars*/ 1L);
1.11 }
1.12
1.13 @end