Bug 982586 - Building kbase with DSL/DSLR resources takes longer compared to drools 5
Summary: Building kbase with DSL/DSLR resources takes longer compared to drools 5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER2
: 6.0.0
Assignee: Mario Fusco
QA Contact: Petr Široký
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-09 10:51 UTC by Petr Široký
Modified: 2014-08-06 20:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:20:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Maven based reproducer (120.44 KB, application/zip)
2013-07-09 11:00 UTC, Petr Široký
no flags Details

Description Petr Široký 2013-07-09 10:51:39 UTC
Description of problem:
Building kbase (with drools 6) with DSL/DSLR resources takes longer when comparing to building drools 5 kbase with same resources. See attached Maven based reproducer for more info. 

For example on my machine the results are following:
 - drools5: ~5s
 - drools6: ~7s
=> difference ~40 %


Version-Release number of selected component (if applicable):
6.0.0.Beta5 (and current snapshot)


Steps to Reproduce:
1. Run the attached reproducer for both drools versions (mvn test)
2. Compare the execution times that are being printed to stdout


Actual results:
Building kbase from DSL/DSLR takes longer comparing to drools 5


Expected results:
KBase build time for drools 6 is better or ~same as for drools 5

Comment 1 Petr Široký 2013-07-09 11:00:20 UTC
Created attachment 770923 [details]
Maven based reproducer

Comment 2 Mario Fusco 2013-07-28 16:18:18 UTC
The performance degradation has been mainly caused by the addition of some new features like named consequences, inline casts, grouped accessors, etc. that even if not used in the provided test case increase the complexity of the drl parser and compiler.

With this commit https://github.com/droolsjbpm/drools/commit/eae854a7d5f8e86cf41f48c13d4cfef2a134139b I tried to do some optimizations like caching the hashcode of the AlphaNodes and parallelizing the wiring of the generated class.

At the moment the performance difference between the 5.3 and 6.0 on my machine is less than 10%, but I have a 4 cores cpu and I expect an even smaller gap (or none at all) on a pc with 8+ cores due to that parallelization I was mentioning above.

Comment 6 Petr Široký 2013-10-20 11:58:58 UTC
Latest test result shows no difference between 5.3.1-P04 and 6.0.0-ER4, so I am marking this as verified.


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