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

Performance-Analysis of Camunda Process Engine #19

Open
tobiasschaefer opened this issue Feb 28, 2020 · 3 comments
Open

Performance-Analysis of Camunda Process Engine #19

tobiasschaefer opened this issue Feb 28, 2020 · 3 comments
Assignees

Comments

@tobiasschaefer
Copy link
Collaborator

Starting the Camunda process engine takes a few seconds. Let's analyze what is taking so long using e.g. inspectIT.

@tobiasschaefer tobiasschaefer self-assigned this May 8, 2020
@tobiasschaefer
Copy link
Collaborator Author

tobiasschaefer commented May 8, 2020

I analyzed this with inspectIT: https://github.com/inspectIT/inspectIT/releases

Starting the process engine takes about 5,5 seconds on my laptop. Of that time MyBatis already needs 3,5 seconds to parse the XML mappings. Camunda needs 53 mappings - some of them need several hundred milliseconds to parse and this then sums up to multiple seconds.

Camunda 7.13.0-alpha4 still has the same issue.

Here is a good introduction on Camunda and its usage of MyBatis: https://docs.camunda.org/manual/7.7/examples/tutorials/custom-queries/
The documention is for version 7.7 because the chapter seems to have been removed in the current documentation. I don't know how much is still relevant but it might help.

Here are the invocation sequences as recorded by inspectIT:

callstack1

callstack2

callstack3

tobiasschaefer referenced this issue in tobiasschaefer/micronaut-camunda-bpm May 15, 2020
…ving all unneeded mappers. This is not a solution but shows that the mappers are the problem. Note: setting lazyLoadingEnabled=true does not seem to have any influence.
@tobiasschaefer
Copy link
Collaborator Author

tobiasschaefer commented May 15, 2020

I pushed a commit to the branch https://github.com/tobiasschaefer/micronaut-camunda-bpm/tree/issue19-startup-time

Reduced startup from 5 seconds to about 2.1 seconds by removing all unneeded mappers. This is not a solution but shows that the mappers are the problem. Note: setting lazyLoadingEnabled=true does not seem to have any influence.

Note: lazyLoadingEnabled is not related to loading of the mappings but to the relations between entities: https://mybatis.org/mybatis-3/configuration.html

I think we need to find a way to reduce the number of mappers loaded on startup or initialize them in parallel.

@tobiasschaefer
Copy link
Collaborator Author

Here is MyBatis together with GraalVM: mybatis/mybatis-3#1552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant