[rules-users] Java code Vs Drools

Hehl, Thomas Thomas.Hehl at acs-inc.com
Wed Aug 13 07:49:23 EDT 2008


Sorry, I should have said for business software. Systems software requires a
lot more performance tuning.

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Hehl, Thomas
Sent: Wednesday, August 13, 2008 7:46 AM
To: 'Rules Users List'
Subject: RE: [rules-users] Java code Vs Drools

While it's always important to keep an eye on performance while writing
code, the things that really cost money are stability and maintainability.
You write your software so it's easy to maintain and reliable and next week
someone will build a faster processor to run it on.

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Mark Proctor
Sent: Wednesday, August 13, 2008 6:18 AM
To: Rules Users List
Subject: Re: [rules-users] Java code Vs Drools

Corneil du Plessis wrote:
> Make sure when you do performance testing that you run through enough
> iterations so that the engine code benefits from HotSpot. 
>   
Something to be aware of is that there are still many optimsation we can 
do to Drools. One of them is to take our interpretted Rete network and 
compile it down to bytecode, so that it would resemble something closer 
to hand written java. For tight looped stuff, that should give a nice 
perf increase. However mostly drools is "fast enough" so we are focusing 
on building out the platform and features, but we'll continue to improve 
performance slowly overtime - there is still so much more we can do.

Mark
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Harsh Jetly
> Sent: 13 August 2008 11:03
> To: rules-users at lists.jboss.org
> Subject: [rules-users] Java code Vs Drools 
>
>
> I have been evaluating the rule engine (ie Drools 4.0.4). I have created
an
> application which has about 20 rules . I insert about 500 arraylists into
> the working memory and each arraylist contains about 4 objects. The rule
> engine picks the object that is the best match from the arraylist and
stores
> it .
> This processing takes about 0.953 secs .
>
> Now this very same scenario I have implemented in using java code (if
> ..else)...it takes about 0.016secs .
>
> I was expecting the rule engine to give a better performance. Considering
> the use of alpha node caching and other factors of the rete algorithm.
>
> This is how one of the rules look in the rule file :
>
> rule "P1 110"
>
> salience 1
> activation-group "1"
>
>       when
>             PriorityType( pricetype == "10,20,30,40,110" )
>             list :ArrayList(  )
>             t:TlbObjectAttributeData( lngAttrTypeId == 110 ) from list
>       then
>                   result.add(t);
>
> end
>
>
> Am I doing something wrong or this application is not harnessing the
pluses
> of the rule engine .
>
> If so can you please tell me which kind of application should I build to
> highlight the performance of a rule engine .
>
> Appreciate it
>
>
> Regards
> Harsh Jetly
> SOA
> Center of Excellence
>
>
>
> ______________________________________________________________________
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>   

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



More information about the rules-users mailing list