diff options
author | Paul Johnson <paul@pjcj.net> | 2014-08-23 21:08:17 +0200 |
---|---|---|
committer | Paul Johnson <paul@pjcj.net> | 2014-08-23 21:08:17 +0200 |
commit | d9deafe57ccf2fc2191f48c989859e87b7daab06 (patch) | |
tree | d39ccd9f1aef70eea74614ddc4ae3c3a4c0bec6f | |
parent | d40c0704f0bc5df3ac3b0ae7dcbfbf5f83a8f840 (diff) | |
download | irssi-d9deafe57ccf2fc2191f48c989859e87b7daab06.zip |
Speed up /reload when there are many ignores.
With many ignores (a few thousand) /reload could take so long that connections
were dropped. The problem is that nickmatch_rebuild() was being called for
every ignore. The easy solution is to only call it once at the end.
-rw-r--r-- | src/core/ignore.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c index 3c45967c..68fae11f 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -360,8 +360,6 @@ static void ignore_destroy(IGNORE_REC *rec, int send_signal) g_free_not_null(rec->servertag); g_free_not_null(rec->pattern); g_free(rec); - - nickmatch_rebuild(nickmatch); } void ignore_update_rec(IGNORE_REC *rec) @@ -380,8 +378,8 @@ void ignore_update_rec(IGNORE_REC *rec) ignore_init_rec(rec); signal_emit("ignore changed", 1, rec); - nickmatch_rebuild(nickmatch); } + nickmatch_rebuild(nickmatch); } static int unignore_timeout(void) |