comparison 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
comparison
equal deleted inserted replaced
2280:f1eebfdd6db7 2281:1bb9002801e5
41 hk_handler_t handler; 41 hk_handler_t handler;
42 gint priority; 42 gint priority;
43 gpointer userdata; 43 gpointer userdata;
44 guint hid; 44 guint hid;
45 } hook_list_data_t; 45 } hook_list_data_t;
46
47 extern int build_buddylist;
46 48
47 static GHashTable *hk_handler_hash = NULL; 49 static GHashTable *hk_handler_hash = NULL;
48 50
49 // _new_hook_id() 51 // _new_hook_id()
50 // Return a unique Hook Id 52 // Return a unique Hook Id
565 } 567 }
566 } 568 }
567 569
568 roster_setstatus(bjid, rn, prio, status, status_msg, timestamp, 570 roster_setstatus(bjid, rn, prio, status, status_msg, timestamp,
569 role_none, affil_none, NULL); 571 role_none, affil_none, NULL);
570 buddylist_build(); 572 build_buddylist = TRUE;
571 update_roster = TRUE;
572 hlog_write_status(bjid, timestamp, status, status_msg); 573 hlog_write_status(bjid, timestamp, status, status_msg);
573 574
574 #ifdef MODULES_ENABLE 575 #ifdef MODULES_ENABLE
575 { 576 {
576 char os[2] = " \0"; 577 char os[2] = " \0";