A common configuration mistake which makes Seam slow
I have been working with Seam for quite some time now. I’ve noticed that each request in Seam takes about 1-2 seconds to respond no matter how simple the page I am accessing is. While this is annoying during development, it is unacceptable for production applications.
I googled “Seam performance issues” but did not find any tips and tricks that applied to my case. So I started looking in my web.xml and components.xml file more carefully.
I noticed the following in my components.xml file.
<component name="org.jboss.seam.core.init"> <property name="debug">true</property> </component>
Setting debug to true produces a more detailed error page when an error occurs. I did not find any more information about performance implications of setting debug to true, so I decided to experiment by setting debug to false and see how it affected performance.
<component name="org.jboss.seam.core.init"> <property name="debug">false</property> </component>
I noticed that Seam was blazing fast after making the change. The 1-2 second delay when accessing any page was gone. I decided to numerically capture the speed difference. So I ran my test 10 times in a loop with a different data set thereby avoiding any unintended caching boosts.
With debug = true, 14 seconds
With debug = false, 7 seconds
This confirmed my observation that setting debug to false boosts Seam’s performance.