commit 8a94439: [Minor] Some optimization
Vsevolod Stakhov
vsevolod at rspamd.com
Sun May 8 11:14:03 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-05-08 12:06:42 +0100
URL: https://github.com/rspamd/rspamd/commit/8a944397339627b4ce725c8e3092f8702a4f5fbe
[Minor] Some optimization
---
src/libserver/symcache/symcache_runtime.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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];
More information about the Commits
mailing list