On 9 May 2013, at 14:47, Sonata <[email protected]> wrote:

> Hi, I just noticed that even I have different agenda-groups, all groups are
> evaluated during fact inset time.
> 
> In an extreme case, if I have 1000 rules in agenda-group "A", and 1 rule in
> agenda-group "B"
> even though I just want to fire the 1 rule in agenda-group "B" by adding
> AgendaFilter in fireAllRules()
> all those 1000 rules in agenda-group "A" will be evaluated (i.e. methods in
> the "when" part are being called)
> even worst if I have complex logic in the "when" part for these 1000 rules,
> e.g. accumulate/from, not to mention eval
> 
> Isn't that quite a performance impact? And forcing people to put their
> logic/checking/matching in the "then" part?
It is and side effect of the Rete network and node sharing, especially sharing 
across groups.

We have a new algorithm, almost ready to try, that is lazy and addresses this 
issue.

For now if you have pert issues, you'll need to combine rules with contexts 
semaphores to turn on and off matching in rule. Context semaphores are just 
root patterns.
> 
> How would you justify this? Or is there something I've missed that you can
> actually evaluate the rule in agenda-group "B" ONLY, when fact is being
> inserted?
> 
> Thank you
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Agenda-group-in-fact-insert-time-tp4023749.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to