Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #3389] enhance illegal macro character processing performance #1141

Closed
icinga-migration opened this issue Oct 24, 2012 · 4 comments

Comments

@icinga-migration
Copy link

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

Created by mfriedrich on 2012-10-24 14:45:41 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2013-04-06 21:42:34 +00:00)
Target Version: 1.9
Last Update: 2013-04-06 21:42:34 +00:00 (in Redmine)


which is a good idea, as it happens all the time.

https://github.com/dnsmichi/nagios-svn/commit/4acd1eea414f4c1faaf03edc6474fa4cfe6253f2

https://github.com/dnsmichi/nagios-svn/commit/b9bd4b870d63d129395a2f37cb5fc08cb401b8ba
https://github.com/dnsmichi/nagios-svn/commit/dd034fb4dd3dacd2b750b492ec1c2f5f93dcb839

https://github.com/dnsmichi/nagios-svn/commit/05722ca455ab7e2129afe3ee9ccf27279cb6d920

Changesets

2013-03-10 17:46:55 +00:00 by (unknown) f88cb3c

core: enhance illegal macro character processing performance

doing the checks on-demand in O(n*m) nested loops costs a heck of
performance when the macro should be cleaned from illegal characters.

by creating a map during initialisation, and only checking against that
will increase performance on macro processing overall.

kudos to Andreas Ericsson for the patch.

refs #3389

2013-03-10 18:22:57 +00:00 by (unknown) 8d50e29

bail early if there aren't any illegal_object_chars defined

which saves some strcmp nops.

refs #3389

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-10-30 21:15:58 +00:00

dnsmichi wrote:

https://github.com/dnsmichi/nagios-svn/commit/4acd1eea414f4c1faaf03edc6474fa4cfe6253f2

applied within 1.8.1 #3397 (as hardcoded numbers are just plain stupid anyways)

https://github.com/dnsmichi/nagios-svn/commit/b9bd4b870d63d129395a2f37cb5fc08cb401b8ba
https://github.com/dnsmichi/nagios-svn/commit/dd034fb4dd3dacd2b750b492ec1c2f5f93dcb839

performance enhancement, requires proper testing.

https://github.com/dnsmichi/nagios-svn/commit/05722ca455ab7e2129afe3ee9ccf27279cb6d920

that is fixed within #3404 but requires a general simplication on the error handling after the macro was grabbed. there's a mix of handling the return value and the processed buffer, which is totally brainfoo.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-03-04 18:20:02 +00:00

  • Category set to Macros
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-03-10 17:46:38 +00:00

  • Subject changed from enhance illegal macro char processing to enhance illegal macro character processing performance

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-04-06 21:42:34 +00:00

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant