Drools DRL: Fewer larger rules vs many smaller rules -
i have many rule constraints can logically grouped "or". example: 3 rules "r1", "r2" , "r3". can construct single lhs as:
(r1 || r2 || r3)
or can make each of them separate rule. have no critical functional requirement doing either way since can detect grouping independently outside of drools.
i wonder if 1 way more advantageous other runtime execution perspective (performance, memory, etc.).
a disjunction @ pattern level handled 2 different rules, there's not gained or lost either way.
but maintenance , development point of view, 2 separate rules require 2 copies of right hand side, using disjunction in single rule appears preferable.
establishing binding variables used little tricky think recent versions (6.x) of drools handle satisfactorily.
note disjunctions @ constraint level should not split separate rules.
Comments
Post a Comment