[rules-users] Drools 4 performs slower then Drools 3 - Help on .drlfile adaptation

Joe White Joe.White at recondotech.com
Wed Nov 19 13:16:35 EST 2008


Maxim,

Depending on your use case you may be able to disable shadow facts in your Drools 4 instance. See the manual on when it is ok/not-ok to disable shadow facts. Based on your description it probably is acceptable for your uses. Disabling shadow facts may improve your performance, the manual has details.

 

To disable shadow facts:

  RuleBaseConfiguration conf = new RuleBaseConfiguration();

                    conf.setShadowProxy(false);

                    base = RuleBaseFactory.newRuleBase(conf);

 

From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Maxim Veksler
Sent: Wednesday, November 19, 2008 8:36 AM
To: Rules Users List
Subject: [rules-users] Drools 4 performs slower then Drools 3 - Help on .drlfile adaptation

 

Hello everyone,


Please allow me to briefly describe how our system works:

We use drools as an efficient matching layers - I have X rules, in the RHS of each rule I have a mark for each rule to signal that it has passed in the current context (There are by definition more then 1 contexts). After the first fireAllRules() has finished, and I have the data structure that allows me to query what rules have passed for each context I assert a "Marker" object, that allows Drools to continue filtering only for these contexts that I decide as valid to match attempts.

The end result, is that I have 2 fireAllRules called with some java code in between them.


In drools3 for 3 contexts I got the following resutls :

== Drools Section (Generic Call) : With default context settings, no HotSpot.
RESULT::::::::    avg: 33.9023(ms) for 1555 calls

Now in drools4 I'm getting the following:

== Drools Section (Generic Call) : With default context settings, no HotSpot - Drools 4
RESULT::::::::    avg: 37.4356(ms) for 1467 calls



As I increase the context's number I'm getting larger difference in results time.
Please note that HotSpot is disabled just for the test, to not JIT interference.

I've disabled all evals in the drl files, to all is left is pure Drools syntax and yet It seems that the system works slower.

Please suggest what else I should be doing to optimize the drl files to work efficiently with Drools 4 engine.


Thank you,
Maxim.

-- 
Cheers, 
Maxim Veksler

"Free as in Freedom" - Do u GNU ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081119/293f2eef/attachment.html 


More information about the rules-users mailing list