[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: * core: avoid senseless looping when free()'ing macros (Andreas Ericsson) #2184

git at icinga.org git at icinga.org
Fri Jan 27 16:32:15 CET 2012


Module: icinga-core
Branch: mfriedrich/core
Commit: c436c6d30986866febf02932eb97229c55e7df34
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=c436c6d30986866febf02932eb97229c55e7df34

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Jan 27 16:28:55 2012 +0100

* core: avoid senseless looping when free()'ing macros (Andreas Ericsson) #2184

previously, the macro free'ing happened within a loop
elaborating with a switch case statement if the macro
should be cleaned or not.
since these calls would have happened either way for
*all* known macros, we just call my_free on all known
macros and prevent senseless looping. clearing out
host/service/hostgroup/servicegroup/contact/contactgroup
macros can be very expensive on the long run when i.e.
sending notifications.

refs #2184

---

 Changelog       |    1 +
 common/macros.c |  273 +++++++++++++++++++++++++------------------------------
 2 files changed, 123 insertions(+), 151 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=c436c6d30986866febf02932eb97229c55e7df34




More information about the icinga-checkins mailing list