diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-05-08 12:06:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-05-08 12:06:42 +0100 |
commit | 8a944397339627b4ce725c8e3092f8702a4f5fbe (patch) | |
tree | 233a2598b52b8e7d8018b61635e7f8ba1a9ab67f | |
parent | e02db847faa6f135cf317918888a45c75bd3997b (diff) | |
download | rspamd-8a944397339627b4ce725c8e3092f8702a4f5fbe.tar.gz rspamd-8a944397339627b4ce725c8e3092f8702a4f5fbe.zip |
[Minor] Some optimization
-rw-r--r-- | src/libserver/symcache/symcache_runtime.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libserver/symcache/symcache_runtime.cxx b/src/libserver/symcache/symcache_runtime.cxx index e09411845..b433213ed 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]; |