Mercurial > ~mikael > mcabber > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
2280:f1eebfdd6db7 | 2281:1bb9002801e5 |
---|---|
20 #include <string.h> | 20 #include <string.h> |
21 | 21 |
22 #include "roster.h" | 22 #include "roster.h" |
23 #include "utils.h" | 23 #include "utils.h" |
24 #include "hooks.h" | 24 #include "hooks.h" |
25 | |
26 int build_buddylist; | |
25 | 27 |
26 extern void hlog_save_state(void); | 28 extern void hlog_save_state(void); |
27 | 29 |
28 char *strrole[] = { /* Should match enum in roster.h */ | 30 char *strrole[] = { /* Should match enum in roster.h */ |
29 "none", | 31 "none", |
1030 if (roster_last_activity_buddy) | 1032 if (roster_last_activity_buddy) |
1031 last_activity_buddy = g_list_find(buddylist, roster_last_activity_buddy); | 1033 last_activity_buddy = g_list_find(buddylist, roster_last_activity_buddy); |
1032 // current_buddy initialization | 1034 // current_buddy initialization |
1033 if (!current_buddy || (g_list_position(buddylist, current_buddy) == -1)) | 1035 if (!current_buddy || (g_list_position(buddylist, current_buddy) == -1)) |
1034 current_buddy = g_list_first(buddylist); | 1036 current_buddy = g_list_first(buddylist); |
1037 | |
1038 build_buddylist = FALSE; | |
1035 } | 1039 } |
1036 | 1040 |
1037 // buddy_hide_group(roster, hide) | 1041 // buddy_hide_group(roster, hide) |
1038 // "hide" values: 1=hide 0=show_all -1=invert | 1042 // "hide" values: 1=hide 0=show_all -1=invert |
1039 void buddy_hide_group(gpointer rosterdata, int hide) | 1043 void buddy_hide_group(gpointer rosterdata, int hide) |