Optimizing Startup Time

110 views
Skip to first unread message

Tobias Schäfer

unread,
Jul 6, 2021, 1:19:20 PM7/6/21
to mybatis-user
Hi,

I'm the lead developer behind the open source project integrating Micronaut and the process automation platform Camunda.

Camunda uses MyBatis with over 50 XML mapping files, see mappings 

Micronaut is known for its good startup times but unfortunately the bootstrapping of the Camunda engine takes a few seconds. The bottleneck is the parsing of MyBatis' XML mapping files, see also issue #19


I thought about the following optimizations to improve start up times:
1. Use some kind of lazy mapping initialisation (I didn't find any options)
2. Replace XML Mappings with the Java API? Is there a converter somewhere? (I didn't find any converter and there is too much to convert it manually)
3. Switch MyBatis' sequential parsing of XML mappings to parallel parsing. (I tried it some time ago and it helps but I didn't find the best place to synchronize the parallel executions, see branch 353-fixup)

Do you have any idea how to improve start up time?

Kind Regards
Tobias

Peter Cao

unread,
Jul 14, 2021, 6:00:23 AM7/14/21
to mybatis-user
I found a brand new java persistence layer, there are no any configuration, just only pure java object, and have good execution performance,
I will share with you if you will.

Thanks

Peter

Tobias Schäfer

unread,
Jul 16, 2021, 2:11:34 AM7/16/21
to mybatis-user
Hi Peter,

I know about the MyBatis Java API: https://mybatis.org/mybatis-3/java-api.html
Is that what you are referring to?

If you have any more details I'd love to hear them.


Kind Regards
Tobias

Peter Cao

unread,
Jul 16, 2021, 4:29:20 AM7/16/21
to mybati...@googlegroups.com
Hi Tobias,

If you want to find a way to improve the performance of parse Mybatis mapping files, I have no idea,
I want to tell you about a brand new data persistence framework named delicacy https://www.spdycoding.com
It's totally pure java object to implement db operation, no any mapping file needed.
If you want to try this framework for you platform, I will tell the all details about it.
You can reach me, Skype: petercaogx

Thanks.
Peter

Tobias Schäfer <tobias.sc...@gmail.com> 于2021年7月16日周五 下午2:11写道:
--
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/5PwAwsBc8G8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/1556e3cd-2bb0-4343-89ee-89a128187149n%40googlegroups.com.

Tobias Schäfer

unread,
Jul 16, 2021, 6:17:46 AM7/16/21
to mybatis-user
Hi Peter,

thanks.

We're building an integration project between Micronaut and Camunda and it's (the third party product) Camunda that is defining and using those mappings. Therefore it's no option for me to use an alternative framework.

Kind Regars
Tobias

Peter Cao

unread,
Jul 17, 2021, 7:06:25 AM7/17/21
to mybati...@googlegroups.com
Understood.

And by the way I have a code generator tool to generate MyBatis mapping file and associated Daos, It's not only for database table, 
but also can generate for any select SQL.
You should to try it I think.

Thanks
Peter



Tobias Schäfer <tobias.sc...@gmail.com> 于2021年7月16日周五 下午6:17写道:

M Huzaifah

unread,
Jul 20, 2021, 7:12:42 AM7/20/21
to mybati...@googlegroups.com
Share us that generator please. Give us the git repo. 

Regards

You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAF47DBv3XJEV5HGdqgf3pip4azfypKTticAZMuPCSC5Qvc7vPg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages