OK, using here's the changes I made and the performance is much better now
(using same data set) for JPA:
`<property name="hibernate.jdbc.batch_size" value="25"/> ` no difference
PersistenceContextType.TRANSACTION
@Singleton
DBUtils bean is still using @Stateful since I do not want to create
QueryRunner, ScalarHandler and BeanListHandler on each invocation. Any other
JPA optimization I should make to make it more comparable to DBUtils?
Jun 20, 2017 9:39:40 PM com.codeferm.jpavsdbutils.PerformanceTest
performance
INFO: JPA add elapsed milliseconds: 4765
Jun 20, 2017 9:39:40 PM com.codeferm.jpavsdbutils.PerformanceTest
performance
INFO: JPA get elapsed milliseconds: 323
Jun 20, 2017 9:39:45 PM com.codeferm.jpavsdbutils.PerformanceTest
performance
INFO: JPA delete elapsed milliseconds: 5035
Jun 20, 2017 9:39:47 PM com.codeferm.jpavsdbutils.PerformanceTest
performance
INFO: DbUtils add elapsed milliseconds: 1757
Jun 20, 2017 9:39:47 PM com.codeferm.jpavsdbutils.PerformanceTest
performance
INFO: DbUtils get elapsed milliseconds: 67
Jun 20, 2017 9:39:48 PM com.codeferm.jpavsdbutils.PerformanceTest
performance
INFO: DbUtils delete elapsed milliseconds: 895
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JPA-vs-DBUtils-tp4681918p4681932.html
Sent from the TomEE Users mailing list archive at Nabble.com.
|