emacarron / old-google-code-issues

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Startup time using MyBatis 3.2.0 is 20% slower that MyBatis 3.1.1 #716

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?
Testing with MyBatis 3.2.0 Nov 4th Snapshot

Please describe the problem.  Unit tests are best!
Start up time is 20% slower when using 3.2.0.  Went from ~36 seconds with 
MyBatis 3.1.1 to ~45 seconds using 3.2.0.

What is the expected output? What do you see instead?
N/A

Can you provide stack trace, logs, error messages that are displayed?

No error messages.  

Please provide any additional information below.

Java 1.6.35
Tomcat 6.35
Spring 3.1.2

Original issue reported on code.google.com by uwodino...@gmail.com on 9 Nov 2012 at 4:49

GoogleCodeExporter commented 9 years ago
Yes, that is not a bug. MyBatis 3.2.0 enables using xml syntax in Annotated 
Mappers so it takes longer to startup.

Original comment by eduardo.macarron on 9 Nov 2012 at 6:27

GoogleCodeExporter commented 9 years ago
BTW.... are you using annotated mappers or only xml?

Original comment by eduardo.macarron on 9 Nov 2012 at 6:28

GoogleCodeExporter commented 9 years ago
We are not using annotated mappers.  Only xml

Original comment by uwodino...@gmail.com on 9 Nov 2012 at 8:56

GoogleCodeExporter commented 9 years ago
Then there may be a problem. Just to be sure, could you test the startup with 
this jar?
http://code.google.com/p/mybatis/downloads/detail?name=mybatis-3.2.0-issue716.ja
r

Original comment by eduardo.macarron on 10 Nov 2012 at 5:05

GoogleCodeExporter commented 9 years ago
I've added the jar and unfortunately, the start up time has not improved.  

Original comment by uwodino...@gmail.com on 13 Nov 2012 at 2:19

GoogleCodeExporter commented 9 years ago
Ok. It was just to confirm where the problem is. 

Indeed, it is not in parsing the annotations but in the new custom languages 
support.

The problem is that in 3.0 and 3.1 includes where proccesed when the xml 
dynamic code was parsed but in 3.2 that is done in two steps, fist includes are 
inlined and selectkeys resolved and then the languaje parser is called.

We knew that will slow down the startup :( But unfortunally did not find any 
better way to do it.

Maybe we can improve a bit that code but I am afraid that 3.2 will never 
startup as fast as 3.1.

Original comment by eduardo.macarron on 16 Nov 2012 at 4:58

GoogleCodeExporter commented 9 years ago
Thanks for looking into it.

Original comment by uwodino...@gmail.com on 16 Nov 2012 at 2:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 6 Apr 2013 at 4:25