diff mcabber/mcabber/roster.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 f5402d705f67
children ece02eb9c81d
line wrap: on
line diff
--- a/mcabber/mcabber/roster.c	Sat Sep 24 12:31:13 2016 +0200
+++ b/mcabber/mcabber/roster.c	Sun Sep 25 15:07:24 2016 +0200
@@ -23,6 +23,8 @@
 #include "utils.h"
 #include "hooks.h"
 
+int build_buddylist;
+
 extern void hlog_save_state(void);
 
 char *strrole[] = {   /* Should match enum in roster.h */
@@ -1032,6 +1034,8 @@
   // current_buddy initialization
   if (!current_buddy || (g_list_position(buddylist, current_buddy) == -1))
     current_buddy = g_list_first(buddylist);
+
+  build_buddylist = FALSE;
 }
 
 //  buddy_hide_group(roster, hide)