Bug 1276311 - Buildtime performance degradation in BR engine when building KieBase from dtables
Buildtime performance degradation in BR engine when building KieBase from dta...
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity high
: CR1
: 6.2.0
Assigned To: Mario Fusco
Tibor Zimanyi
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-29 08:25 EDT by Tibor Zimanyi
Modified: 2015-11-25 04:47 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Mario Fusco 2015-10-30 05:12:21 EDT
The perceived performance degradation has been in reality caused by this fix https://github.com/droolsjbpm/drools/commit/dc81e1f1ca7f56a29b4fb6c0ad0e14bb3c49551c

Now when the compiler finds a complex constraint like the following (that is produced by one of the decision table in the benchmark) 

"X".equals("MASTER") && "X".equals(qualifier) || "X".equals("CATCHALL") && qualifier.equals( "X") && catalogProductModel.getPchId() == null || qualifier.equals("X") && "X".equals("X")

it correctly analyses and eventually normalizes all the subexpressions in that constraint, something that didn't do at all before. 

I tried to mitigate the performance impact of this further necessary checks with this commit https://github.com/droolsjbpm/drools/commit/0b935033f

I checked the effects of this last commit running the Walmart dtable 100 benchmark on my machine with the following results:

before the fix for BZ-1253575
693.183 ± 5.010  ms/op

after the fix but before this performance optimization
809.843 ± 2.854  ms/op

after the performance optimization
779.763 ± 5.744  ms/op
Comment 2 Mario Fusco 2015-11-05 08:41:41 EST
I also cherry-picked to 6.3.x this fix https://github.com/droolsjbpm/drools/commit/cc9a5eab6dc5e6e2a06ace59a3d0c8e0ce282b59 because investigating the issue reported in https://issues.jboss.org/browse/DROOLS-970 I've also found a way to further optimize the performances of the PatterBuilder. 

After this fix I rerun the benchmark mentioned in the former comment obtaining the following result:

747.449 ± 3.265 ms/op
Comment 3 Tibor Zimanyi 2015-11-25 04:47:02 EST
Verified in 6.2.0.CR1. There are improvements from 7% to 10 % against ER5 in dtables benchmarks that we have. I will publish CR1 performance report soon.

Note You need to log in before you can comment on or make changes to this bug.