pidgin: 865afa71: Optimize blist searching with lots and l...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Mon Jul 27 22:40:22 EDT 2009
-----------------------------------------------------------------
Revision: 865afa7130542051d98f8e39bf3e0e6d8c70402c
Ancestor: 9de96edcea00fc0b41b3668bdd9072738cbf149d
Author: aman at tmm1.net
Date: 2009-07-27T22:02:20
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/865afa7130542051d98f8e39bf3e0e6d8c70402c
Modified files:
libpurple/blist.c
ChangeLog:
Optimize blist searching with lots and lots of empty groups
-------------- next part --------------
============================================================
--- libpurple/blist.c 2908d2996da394f24d703b0529cbc4b6867cfe9b
+++ libpurple/blist.c 089822c941a41089f352836b93aafd9e822d0fed
@@ -2432,6 +2432,9 @@ PurpleBuddy *purple_find_buddy(PurpleAcc
hb.name = (gchar *)purple_normalize(account, name);
for (group = purplebuddylist->root; group; group = group->next) {
+ if (!group->child)
+ continue;
+
hb.group = group;
if ((buddy = g_hash_table_lookup(purplebuddylist->buddies, &hb))) {
return buddy;
@@ -2481,6 +2484,9 @@ GSList *purple_find_buddies(PurpleAccoun
hb.account = account;
for (node = purplebuddylist->root; node != NULL; node = node->next) {
+ if (!node->child)
+ continue;
+
hb.group = node;
if ((buddy = g_hash_table_lookup(purplebuddylist->buddies, &hb)) != NULL)
ret = g_slist_prepend(ret, buddy);
More information about the Commits
mailing list