diff mcabber/mcabber/hooks.c @ 2281:1bb9002801e5

Limit the number of roster computations/redraws per second This reduces CPU time and greatly improve performance with very large rosters (e.g. >1000 items).
author Mikael Berthe <mikael@lilotux.net>
date Sun, 25 Sep 2016 15:07:24 +0200
parents f1eebfdd6db7
children ece02eb9c81d
line wrap: on
line diff
--- a/mcabber/mcabber/hooks.c	Sat Sep 24 12:31:13 2016 +0200
+++ b/mcabber/mcabber/hooks.c	Sun Sep 25 15:07:24 2016 +0200
@@ -44,6 +44,8 @@
   guint     hid;
 } hook_list_data_t;
 
+extern int build_buddylist;
+
 static GHashTable *hk_handler_hash = NULL;
 
 //  _new_hook_id()
@@ -567,8 +569,7 @@
 
   roster_setstatus(bjid, rn, prio, status, status_msg, timestamp,
                    role_none, affil_none, NULL);
-  buddylist_build();
-  update_roster = TRUE;
+  build_buddylist = TRUE;
   hlog_write_status(bjid, timestamp, status, status_msg);
 
 #ifdef MODULES_ENABLE