adium 4998:973612acf8df: Only keep track of last-seen dates for ...

commits at adium.im commits at adium.im
Tue Aug 14 00:16:20 UTC 2012


details:	http://hg.adium.im/adium/rev/973612acf8df
revision:	4998:973612acf8df
branch:		adium-1.5.4
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Tue Aug 14 02:16:06 2012 +0200

Only keep track of last-seen dates for contacts we're actually interested in.

This was a massive hit to memory use and startup time.

diffs (12 lines):

diff -r 0083bb897bbd -r 973612acf8df Source/CBContactLastSeenPlugin.m
--- a/Source/CBContactLastSeenPlugin.m	Mon Aug 13 00:02:48 2012 +0200
+++ b/Source/CBContactLastSeenPlugin.m	Tue Aug 14 02:16:06 2012 +0200
@@ -45,7 +45,7 @@
 - (NSSet *)updateListObject:(AIListObject *)inObject keys:(NSSet *)inModifiedKeys silent:(BOOL)silent
 {
 	/* Update only for contacts whose online status has changed */
-	if ([inObject isKindOfClass:[AIListContact class]]) {
+	if ([inObject isKindOfClass:[AIListContact class]] && !inObject.isStranger) {
 		if ([inModifiedKeys containsObject:@"isOnline"]) {
 			if (inObject.online) {
 				//Either they are online, or we've come online. Either way, update both their status and the time




More information about the commits mailing list