You are aware of Java's JIT compilation?
Do you retract the facts after each cycle? Is the Working Memory in
Identity or Equality assertion mode?
Micro-benchmarking Java is tricky. "Beware of the Microbenchmark!" (Dr
Heinz Kabutz, http://www.javaspecialists.eu/archive/Issue124.html
Try to separate the effects by inserting one set of facts until
insertion times have stabilized. Of course, Identity without
retraction will not tell you anything about the speed of handling
assertions with your particular rule set.
On 25/11/2013, ch3xy <igor.strilic(a)gmail.com> wrote:
first of all I'd like to mention that i am pretty new to Drools, so please
be patient :-)
We are using Drools 5.5.0. we have a knowledgeBase of about 500 rules and a
pretty complex object structure. So far everything is working fine … at the
moment we are testing the performance of the engine and we encountered a
quite strange thing. We generated about 10 objects, inserted it into the
session and measured time needed for execution of rules. To simulate a high
number of facts, we inserted the same objects over and over again (100x,
1000x, 10000x). When the first objects were inserted, the time of execution
was about 100ms but for each iteration the execution got faster and faster
(20ms, 10ms and later on even 1ms) ..
Now my question: Are the objects somehow cached in the working memory, so
that execution gets faster or does this increase of performance has an other
reason? I read a few things about shadow facts which are not present anymore
since Drools 5 and sync and async Rete and I think this could be a potential
answer for my question, but I am not able to understand this completely. For
me it is important to know whether the increase of performance is only due
to the fact that we are inserting the same facts over and over again or if a
significant increase of performance is still possible if facts are not
Can someone help me?
Thanks in advance
View this message in context:
Sent from the Drools: User forum mailing list archive at Nabble.com
rules-users mailing list