[ZBXNEXT-3229] Performance improvement of And/Or action condition evaluation Created: 2016 Apr 04  Updated: 2016 Apr 04

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: 3.2.0alpha1
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Glebs Ivanovskis (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: actions, conditions, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If action Type of calculation is And/Or action conditions are ordered by condition type to simplify expression evaluation. (Conditions of equal type are connected with OR, and (... OR ... OR ...) condition blocks are connected with AND.) Assuming that all conditions have equal chances of being true or false and request similar time to process it is good for performance to evaluate (... OR ... OR ...) blocks which contain less conditions. This way less conditions will be evaluated per expression.

Even more sophisticated improvement would be to gather statistics about chances of particular conditions to be true or false, about average condition evaluation time and sorting them accordingly to minimize mathematical expectation of expression evaluation time.


Generated at Wed Apr 02 11:54:56 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.