Bug 1276311 - Buildtime performance degradation in BR engine when building KieBase from dtables
Summary: Buildtime performance degradation in BR engine when building KieBase from dta...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: CR1
: 6.2.0
Assignee: Mario Fusco
QA Contact: Tibor Zimanyi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-29 12:25 UTC by Tibor Zimanyi
Modified: 2020-03-27 19:09 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:09:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Comment 1 Mario Fusco 2015-10-30 09:12:21 UTC
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 13:41:41 UTC
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 09:47:02 UTC
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.