naparuba/shinken — pull request #1013 by geektophe (2013-10-16 19:12:22+00:00)
Title: Optimized macro based business rules expansion

Business rules macro expansion has been added in #972.

The initial behavior is to re-evaluate business rule at each service check if it contains a macro, regardless of the resulting expanded business rule changes.

This patch caches the expanded expression string, and compares the re-evaluated string to only re-evaluate business rule objects if the resulting expanded string changed. It occurs if:

- The business rule is parsed for the first time
- The business rule contains a macro that has just been modulated

This way, the initial patch CPU overhead is almost eliminated.