Re: [rules-users] Drools 5.5.0 - Execution Performance
I used same session for insertion and retracted facts after each cycle. But nothing changes in execution time when creating a new session each cycle. I made a last test with 300 totally different facts and it showed that the rule engine somehow learns and asserts faster if a similar object is inserted ... Anyway, I think my problem is solved for now. Thank you for sour support -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936p4026989.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5.5.0 - Execution Performance
Thanks for your fast reply ... I did not retract the facts after each cycle, I inserted the facts within the loop and fired rules afterwards ... but i repeated the test with fireing rules and retract facts for each cycle - the effect is the same ... the elapsed time is nearly the same (about 2 sec for 600 facts) and it gets faster after the first loop cycle Working memory was in Identity mode (which is default) but I also tried with equality ... same result I changed mode this way: RuleBaseConfiguration ruleBaseConfiguration = new RuleBaseConfiguration(); ruleBaseConfiguration.setAssertBehaviour(RuleBaseConfiguration.AssertBehaviour.IDENTITY); should be correct or am i wrong? BatchExecution resulted in about 2 sec total time as well ... so it seems there is no difference ... It would be great if the rule engine somehow learns over time and assertion gets faster but I am still not sure whether this is because asserting same instances of facts -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936p4026942.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools 5.5.0 - Execution Performance
Hello, 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, 1x). 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 identical? Can someone help me? Thanks in advance -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users