Bug 982586 - Building kbase with DSL/DSLR resources takes longer compared to drools 5
Building kbase with DSL/DSLR resources takes longer compared to drools 5
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high
: ER2
: 6.0.0
Assigned To: Mario Fusco
Petr Široký
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 06:51 EDT by Petr Široký
Modified: 2014-08-06 16:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:20:11 EDT
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)
Maven based reproducer (120.44 KB, application/zip)
2013-07-09 07:00 EDT, Petr Široký
no flags Details

  None (edit)
Description Petr Široký 2013-07-09 06:51:39 EDT
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 07:00:20 EDT
Created attachment 770923 [details]
Maven based reproducer
Comment 2 Mario Fusco 2013-07-28 12:18:18 EDT
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 07:58:58 EDT
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.