Performance: a lot of time is spent getting and setting the auto-commit flag. Suggest it
be configurable
--------------------------------------------------------------------------------------------------------
Key: HHH-5279
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5279
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.5.2
Environment: Seen in Hibernate 3.2 but appears to still be in Trunk
Reporter: Phillip Henry
Priority: Minor
In org.hibernate.transaction.JDBCTransaction, a call to getAutoCommit is made on the
connection at the start of the transaction and if it returns true, a setAutoCommit(true)
is made after Hibernate has finished.
These calls may be network calls (they certainly are with Sybase JConnect 5.5 drivers.
They may be with others as well) and they are done in the same thread as that executing my
INSERT/UPDATE commands. This means that about 25% of the time spent making a simple
Session.saveOrUpdate is spent on something that is not important to me (in my application,
I am not sharing the connection pool with other services so I don't care about the
auto-commit status of connections when they are in the pool).
It would be nice if I could speed up my application a little by setting an optional flag
that indicates to JDBCTransaction whether it should care or not about the state of the
connection when it has finished with it. Or, to have this work done by another thread.
See
http://javaagile.blogspot.com/2010/05/hibernate-and-performance-tuning.html for
YourKit profiles.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira