Hi all,
We have recently migrated our application to Seam 2.0.0.GA which included Hibernate 3.2.4.sp1. We were previously using Seam 1.1.0.CR1 along with Hibernate 3.2.3.GA.
We did some research in order to optimize performance and tweaked with the default properties of entity manager as configured in persistence.xml
Code:
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property name="hibernate.transaction.flush_before_completion" value="true" />
<!-- Mods to cache 01.05.2007 -->
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.jdbc.wrap_result_sets" value="true"/>
<!-- End of Mods -->
<property name="transaction.auto_close_session" value="true" />
<property name="hibernate.show_sql" value="false" />
Furthermore, we disabled all hibernate logs using log4j
Through this approach, we were able to achieve a 10 fold gain in performance with the Seam 1.1.0.CR1, Hibernate 3.2.3.GA, Jboss-4.0.5.GA. Out of Memory problems were also fixed.
However, with the new Seam 2.0.0.GA and Hibernate 3.2.4.sp1, performance has seriously been affected. As a benchmark for us, the application treats data in an xml file. We have an xml file of around 11,000 lines.
With the earlier version, the XML file was processed in around 1-2 minutes. Now it takes up to 17 minutes. Some pages that took a few seconds to be displayed are now taking minutes to be displayed !!
We tried logging into Mysql Server and could see around 400 queries being generated for a particular page.
This is preventing us from going into production. Any help on how we can improve performance of the application would be greatly appreciated.
Thnx,
Yogesh