1 Reply Latest reply on Jan 10, 2013 9:08 PM by Tim Evers

    taking more time when clicking menu items inseam application

    Kishi kiran Newbie

      Hello All,



      I am new to seam, in seam application for menu items, we are using conversation propogation begin

      and one of the menu item we are populating googlemap, so wile click on the menu items, if i have a larger data on my application its is taking 7 o 10 seconds to display that page,

      this is we observed using firebug.



      so this becomes a performanceissue how to resolve this issue, please let me know or mail to kiran9nlk@gmail.com .



      i thought it is due to conversation begin on each menu item but i dont know exactly.



      Thanks in Advance.

        • 1. Re: taking more time when clicking menu items inseam application
          Tim Evers Master

          Well, for starters you are going to have to do some more research.


          Your firebug results of 7 - 10 seconds need more clarification.

          Is it taking that long to receive a response from the server, or is it taking that long to render the page?


          If it is the time is all spent server side then.....you need to investigate where on the server the time is being spent.

          Either set up a profiler or put some logging in your code so you know what is happening.



          When you start talking about a large amount of data...I assume this is some sort of table of information.


          In which case you probably have 1 or both of these problems

          1. You have EL expressions on your page like #{tableRow.value} and this method is not annotated with @BypassInterceptors

               If you do not annotate the property getters with this annotation then each call will have to pass through the entire Seam lifecycle/interceptor stack. Remembering JSF will call the method numerous times for each full pass through its lifecycle.

               So, if you have say 200 fields on the page, it may be resulting in well over 800 method calls. Each of which is going through the Seam interceptor chain.

               However, if you use the annotation then your getters must not reference any resource/variable that is provided by the Seam interceptor chain. eg variables annotated with @In.

          2. You have EL expresssions that map to methods that contain expensive logic.

               Refer to my above point. EL expressions will be evaluated many times on a single render of a page. So do not put expensive logic inside these methods.


          In all my time working with Seam 99.9% of performance issues are caused by one or both of these reasons.


          On a side note. Everyone looking at performance should have read this article (and part 2 which is linked at the end).