From: Vsevolod Stakhov Date: Sun, 8 May 2022 11:06:42 +0000 (+0100) Subject: [Minor] Some optimization X-Git-Tag: 3.3~264 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a944397339627b4ce725c8e3092f8702a4f5fbe;p=thirdparty%2Frspamd.git [Minor] Some optimization --- diff --git a/src/libserver/symcache/symcache_runtime.cxx b/src/libserver/symcache/symcache_runtime.cxx index e094118453..b433213ed0 100644 --- a/src/libserver/symcache/symcache_runtime.cxx +++ b/src/libserver/symcache/symcache_runtime.cxx @@ -426,7 +426,11 @@ symcache_runtime::process_filters(struct rspamd_task *task, symcache &cache, int for (const auto [idx, item] : rspamd::enumerate(order->d)) { /* Exclude all non filters */ if (item->type != symcache_item_type::FILTER) { - continue; + /* + * We use breaking the loop as we append non-filters to the end of the list + * so, it is safe to stop processing immediately + */ + break; } auto dyn_item = &dynamic_items[idx];