[
https://issues.jboss.org/browse/JBRULES-2685?page=com.atlassian.jira.plug...
]
Greg Barton commented on JBRULES-2685:
--------------------------------------
Confirmed. With fromTest looks like it's still there with current 5.2.0-SNAPSHOT, and
even more pronounced. Iterating through multiple calls to DroolsTest.go() inside each
test "smears" it. Here's the best run out of 10 from each version, which
tended to be near the end of the runs, as you'd expect from hotspot kicking in:
5.2.0-SNAPSHOT:
from.drl Count: 200
from.drl Time: 793ms
from.drl Time per element: 3.965ms
BAR Duplicates: 72
FOO Duplicates: 78
reference.drl Count: 80000
reference.drl Time: 780ms
reference.drl Time per element: 0.00975ms
BAR Duplicates: 32198
FOO Duplicates: 32150
5.0.1:
from.drl Count: 200
from.drl Time: 117ms
from.drl Time per element: 0.585ms
BAR Duplicates: 76
FOO Duplicates: 72
reference.drl Count: 80000
reference.drl Time: 1040ms
reference.drl Time per element: 0.013ms
BAR Duplicates: 31720
FOO Duplicates: 31840
Performance degradation from 5.0.1 to 5.1.0
-------------------------------------------
Key: JBRULES-2685
URL:
https://issues.jboss.org/browse/JBRULES-2685
Project: Drools
Issue Type: Quality Risk
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.1.0.FINAL
Environment: OSX 10.6.4
Reporter: Greg Barton
Assignee: Geoffrey De Smet
Priority: Minor
Fix For: 5.2.0.CR1
Attachments: DroolsNested.tar.gz
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: 2000
reference.drl Time: 267ms
reference.drl Time per element: 0.1335ms
BAR Duplicates: 780
FOO Duplicates: 880
reference.drl Count: 20000
reference.drl Time: 1249ms
reference.drl Time per element: 0.06245ms
BAR Duplicates: 7702
FOO Duplicates: 8040
from.drl Count: 200
from.drl Time: 1139ms
from.drl Time per element: 5.695ms
BAR Duplicates: 112
FOO Duplicates: 102
reference.drl Count: 200
reference.drl Time: 5ms
reference.drl Time per element: 0.025ms
BAR Duplicates: 86
FOO Duplicates: 60
5.1.0
reference.drl Count: 2000
reference.drl Time: 300ms
reference.drl Time per element: 0.15ms
BAR Duplicates: 788
FOO Duplicates: 820
reference.drl Count: 20000
reference.drl Time: 1564ms
reference.drl Time per element: 0.0782ms
BAR Duplicates: 8142
FOO Duplicates: 7960
from.drl Count: 200
from.drl Time: 3543ms
from.drl Time per element: 17.715ms
BAR Duplicates: 68
FOO Duplicates: 90
reference.drl Count: 200
reference.drl Time: 13ms
reference.drl Time per element: 0.065ms
BAR Duplicates: 84
FOO 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira