Module: check_mk
Branch: master
Commit: 9ebd8370c25085a59304604672d781517e298015
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ebd8370c25085…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 16 10:12:49 2019 +0100
minor performance improvement with redundant tags_of_host call
Change-Id: Ie081dd4983c24b14522344f3d2eb274278d6e078
---
cmk_base/config.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmk_base/config.py b/cmk_base/config.py
index 01adf15..9c800a0 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -1949,6 +1949,7 @@ def in_binary_hostlist(hostname, conf):
cache[cache_id] = result
else:
for entry in conf:
+ actual_host_tags = tags_of_host(hostname)
entry, rule_options = get_rule_options(entry)
if rule_options.get("disabled"):
continue
@@ -1973,7 +1974,7 @@ def in_binary_hostlist(hostname, conf):
else:
tags, hostlist = entry
- if hosttags_match_taglist(tags_of_host(hostname), tags) and \
+ if hosttags_match_taglist(actual_host_tags, tags) and \
in_extraconf_hostlist(hostlist, hostname):
cache[cache_id] = not negate
break