Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[dev.icinga.com #2665] get rid of the insane macro usage while logging #991

Closed
icinga-migration opened this Issue Jun 6, 2012 · 1 comment

Comments

Projects
None yet
1 participant
Member

icinga-migration commented Jun 6, 2012

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2665

Created by mfriedrich on 2012-06-06 10:29:26 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-07-20 18:19:35 +00:00)
Target Version: 1.8
Last Update: 2012-07-20 18:19:35 +00:00 (in Redmine)


sounds reasonable to drop unneeded macro computation when we actiually know about these things already on logging.

core logging: Get rid of the insane macro usage
Computing macros is ridiculously expensive. Looking them up is
even more so. While fixing the macro lookup thing would be a
Good Thing(tm), using macros for this simple purpose is very
much overkill. This patch remedies that particular folly and
reduces load-time by an immense amount in large networks when
initial states logging is enabled.

Signed-off-by: Andreas Ericsson 

see my svn2git rebased github
https://github.com/dnsmichi/nagios-svn/commit/364f12aa00f88cc8096c0aea34658b8a1e49239e

Changesets

2012-07-06 14:27:31 +00:00 by mfriedrich f7485b7

core: get rid of the instame macro usage while logging alerts and states (Andreas Ericsson) #2665

previously, each alert or state being logged caused all host and service
macros being grabbed (including memory allocation for those), and
logging the final processed buffer. as we can use some smaller switch
case function helpers to generated the same output for the already known
attributes on those hosts and services, we just remove that insame cpu
burning 'feature'.

refs #2665

2012-08-19 17:32:34 +00:00 by mfriedrich 68e0bdd

core: get rid of the instame macro usage while logging alerts and states (Andreas Ericsson) #2665

previously, each alert or state being logged caused all host and service
macros being grabbed (including memory allocation for those), and
logging the final processed buffer. as we can use some smaller switch
case function helpers to generated the same output for the already known
attributes on those hosts and services, we just remove that insame cpu
burning 'feature'.

refs #2665

Conflicts:
	Changelog
Member

icinga-migration commented Jul 20, 2012

Updated by mfriedrich on 2012-07-20 18:19:35 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

@icinga-migration icinga-migration added this to the 1.8 milestone Jan 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment