Thanks for the explanation Edson!
That's fine. In the meantime we will do our best to pre-compute the most we can in accumulate() ;-).
Best regards,

Bruno.

Le 24/08/2011 16:21, Edson Tirelli a écrit :

   Yes, evaluation is incremental, so for every new fact, it will call accumulate() and getResult().

   We do want to reduce the calls to getResult(), improving performance, but it is not easy to figure out a way, as from an engine perspective, it never knows when the application is done inserting facts and it is time to calculate the final result.

   Edson

2011/8/24 Bruno Freudensprung <bruno.freudensprung@temis.com>
Hi,

While testing my custom accumulation function I noticed an unexpected
behavior (th'ats of course a personal point of view).
It seems that Drools 5.1 calls accumulate(...) and getResult(...) as
many times as the number of accumulated facts (accumulate, getResult,
accumulate, getResult, etc...).
Is it supposed to work like this?

Best regards,

Bruno.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users