Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DROOLS-6683] improve ContextImpl constructor performance #4012

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

mariofusco
Copy link
Contributor

Thank you for submitting this pull request

NOTE!: Double check the target branch for this PR.
The default is main so it will target Drools 8 / Kogito / Optaplanner 8.
If this PR is not strictly related to drools and kogito project in drools.git, it should probably target 7.xas a branch

Ports If a forward-port or a backport is needed, paste the forward port PR here

JIRA: https://issues.redhat.com/browse/DROOLS-6683

@mariofusco mariofusco requested a review from tkobayas November 12, 2021 16:27
@kie-ci
Copy link
Contributor

kie-ci commented Nov 12, 2021

The (build) kogito-examples check has failed. Please check the logs.

Copy link
Contributor

@tkobayas tkobayas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Attached an async-profiler flamegraph of StatelessSessionConcurrentBenchmark with the PR to the JIRA ( https://issues.redhat.com/secure/attachment/12660221/after-pr-flame-cpu-StatelessSessionConcurrentBenchmark-thread1.svg ). Now ContextImpl.<impl> is much smaller.

Benchmark result also gets better.

Before PR

1 thread

Benchmark                                                            Mode  Cnt       Score      Error  Units
StatelessSessionConcurrentBenchmark.testStatelessKieSession         thrpt    5  114576.824 ± 5141.367  ops/s

20 threads

Benchmark                                                            Mode  Cnt       Score      Error  Units
StatelessSessionConcurrentBenchmark.testStatelessKieSession         thrpt    5  151469.510 ± 2266.503  ops/s

After PR

1 thread

Benchmark                                                            Mode  Cnt       Score       Error  Units
StatelessSessionConcurrentBenchmark.testStatelessKieSession         thrpt    5  122195.505 ± 12761.116  ops/s

20 threads

Benchmark                                                            Mode  Cnt       Score      Error  Units
StatelessSessionConcurrentBenchmark.testStatelessKieSession         thrpt    5  201325.006 ± 2998.486  ops/s

@mariofusco mariofusco merged commit bf51954 into apache:main Nov 15, 2021
@mariofusco mariofusco deleted the d6683 branch November 15, 2021 07:59
mariofusco added a commit to mariofusco/drools that referenced this pull request Nov 15, 2021
mariofusco added a commit that referenced this pull request Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants