After the introduction of
ZBX-11829, some kind of trigger expression containing macros broke. For fixing it, ZBX-11951 introduce some expensive calls to substitute_simple_macros() for that.
There are potentially redundant calls in the code branch from DBmass_update_triggers() down to evaluate_expression() and this is (pretty sure) a performance hit.
That part of code should be re-worked for making performances better in this regard