[rules-dev] FYI: Performance degradation from 5.0.1 to 5.1.0

Greg Barton greg_barton at yahoo.com
Thu Sep 2 22:46:39 EDT 2010


I've observed a sizable (25%) performance degradation between the 5.0.1 and 5.1.0 releases.  I've attached a sample project that tests the performance of matching nested objects. (ANd compares direct reference matching and the performance pitfalls of "from," but that's beside the current point.)
If you switch the pom.xml from using 5.0.1 to 5.1.0 for the drools dependencies you'll see 25% longer execution times on the tests. (mvn test)  
Here's the test output:
5.0.1
reference.drl Count: 2000reference.drl Time: 267msreference.drl Time per element: 0.1335msBAR Duplicates: 780FOO Duplicates: 880
reference.drl Count: 20000reference.drl Time: 1249msreference.drl Time per element: 0.06245msBAR Duplicates: 7702FOO Duplicates: 8040
from.drl Count: 200from.drl Time: 1139msfrom.drl Time per element: 5.695msBAR Duplicates: 112FOO Duplicates: 102
reference.drl Count: 200reference.drl Time: 5msreference.drl Time per element: 0.025msBAR Duplicates: 86FOO Duplicates: 60

5.1.0
reference.drl Count: 2000reference.drl Time: 300msreference.drl Time per element: 0.15msBAR Duplicates: 788FOO Duplicates: 820
reference.drl Count: 20000reference.drl Time: 1564msreference.drl Time per element: 0.0782msBAR Duplicates: 8142FOO Duplicates: 7960
from.drl Count: 200from.drl Time: 3543msfrom.drl Time per element: 17.715msBAR Duplicates: 68FOO Duplicates: 90
reference.drl Count: 200reference.drl Time: 13msreference.drl Time per element: 0.065msBAR Duplicates: 84FOO Duplicates: 74

On the most taxing test (20k objects) 5.0.1 took 1249ms while 5.1.0 took 1564ms, and for larger tests the effect is more pronounced.  This is primarily a test of == on object references.
GreG


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20100902/19be368e/attachment.html 


More information about the rules-dev mailing list