Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/screen.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 |
---|---|
65 #define DEFAULT_LOG_WIN_HEIGHT (5+2) | 65 #define DEFAULT_LOG_WIN_HEIGHT (5+2) |
66 #define DEFAULT_ROSTER_WIDTH 24 | 66 #define DEFAULT_ROSTER_WIDTH 24 |
67 #define CHAT_WIN_HEIGHT (maxY-1-Log_Win_Height) | 67 #define CHAT_WIN_HEIGHT (maxY-1-Log_Win_Height) |
68 | 68 |
69 #define DEFAULT_ATTENTION_CHAR '!' | 69 #define DEFAULT_ATTENTION_CHAR '!' |
70 | |
71 extern int build_buddylist; | |
70 | 72 |
71 const char *LocaleCharSet = "C"; | 73 const char *LocaleCharSet = "C"; |
72 | 74 |
73 static unsigned short int Log_Win_Height; | 75 static unsigned short int Log_Win_Height; |
74 static unsigned short int Roster_Width; | 76 static unsigned short int Roster_Width; |
2536 // Remove the readmark if it is at the end of the buffer | 2538 // Remove the readmark if it is at the end of the buffer |
2537 scr_buffer_readmark(-1); | 2539 scr_buffer_readmark(-1); |
2538 } | 2540 } |
2539 // We should rebuild the buddylist but not everytime | 2541 // We should rebuild the buddylist but not everytime |
2540 if (!(buddylist_get_filter() & 1<<prev_st)) | 2542 if (!(buddylist_get_filter() & 1<<prev_st)) |
2541 buddylist_build(); | 2543 build_buddylist = TRUE; |
2542 update_roster = TRUE; | 2544 update_roster = TRUE; |
2543 } | 2545 } |
2544 | 2546 |
2545 // scr_roster_top() | 2547 // scr_roster_top() |
2546 // Go to the first buddy in the buddylist | 2548 // Go to the first buddy in the buddylist |