4 Replies Latest reply on Dec 6, 2010 4:46 PM by Timur Junussov

    Seam 2.0.2 SP1 + Richfaces 3.2.0 Performance Issues

    Dax Abraham Newbie
      Environment:

      1. Jboss AS 4.2.3 GA
      2. Seam 2.0.2 SP1
      3. Richfaces 3.2.0

      For a page that has menu panel, tab panel, rich panel, et. al. we see a lot of requests for Javascript, CSS, etc being made from the generated page.

      The requests are like:

      doc       http://208.82.204.52/sh_cict/clinicalinsight.seam?userId=tpeterson1               gzip       4029       12.5K (105.1K)       
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript      2/18/2009      gzip      308      13.5K (51.3K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/ajax4jsf/javascript/scripts/form.js      2/18/2009      gzip      128      0.6K (1.6K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript      2/18/2009      gzip      405      23.8K (94.9K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/utils.js      2/18/2009      gzip      136      2.4K (8.3K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/browser_info[snip]      2/18/2009      gzip      123      0.4K (1.2K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/modalPanel.j[snip]      2/18/2009      gzip      196      4.8K (18.3K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/modalPanelBo[snip]      2/18/2009      gzip      133      1.4K (7.6K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/form.js      2/18/2009      gzip      126      0.2K (0.3K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/panelMenu.js      2/18/2009      gzip      140      2.2K (9.1K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/jquery/jquer[snip]      2/18/2009      gzip      556      16.2K (55.5K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/script/controlUtils.[snip]      2/18/2009      gzip      139      0.4K (1.4K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTorg.ajax4jsf.javascript.ImageCacheScript      2/18/2009      gzip      126      0.1K (0.2K)      
      js      http://208.82.204.52/sh_cict/a4j_3_2_0.SR1-SNAPSHOTscripts/tabPanel.js

      We have enabled mod-gzip and mod-expires but we notice his does not get applied on the a4j requests.

      Any help will be appreciated.

      thanks.
        • 1. Re: Seam 2.0.2 SP1 + Richfaces 3.2.0 Performance Issues
          Drew Kutchar Newbie

          Try adding the following to your web.xml which will make RichFaces download all the css and js as big cache-able files.



                  <context-param>
                          <param-name>org.richfaces.LoadStyleStrategy</param-name>
                          <param-value>ALL</param-value>
                  </context-param>
          
                  <context-param>
                          <param-name>org.richfaces.LoadScriptStrategy</param-name>
                          <param-value>ALL</param-value>
                  </context-param>
          


          • 2. Re: Seam 2.0.2 SP1 + Richfaces 3.2.0 Performance Issues
            Dax Abraham Newbie
            Thanks for your input, it worked great. Now though I the requests have been now reduced to just a 3 requests for the JS and CSS i.e.

            doc       [HTTP headers]  https://www.sharedhealth.com/sh_cict/clinicalinsight.seam               gzip       7113        (160.1K)       
            js      [HTTP headers]  https://www.sharedhealth.com/sh_cict/a4j_3_2_0.SR1-SNAPSHOT/org/richfaces/ui.pack.js      2/18/2009      gzip      1655      (368.0K)      
            js      [HTTP headers]  https://www.sharedhealth.com/sh_cict/a4j_3_2_0.SR1-SNAPSHOT/org/ajax4jsf/framework.pack.js      2/18/2009      gzip      828      (285.0K)      
            ParamsHeadersPost
            Response Headers
            Date:     Tue, 17 Feb 2009 22:20:10 GMT
            Server:     IBM_HTTP_Server
            Cache-Control:     no-cache, max-age=86400
            Pragma:     no-cache
            X-Powered-By:     Servlet 2.4; JBoss-4.3.0.GA_CP02 (build: SVNTag=JBPAPP_4_3_0_GA_CP02 date=200808051050)/JBossWeb-2.0
            Last-Modified:     Tue, 17 Feb 2009 21:27:29 GMT
            Expires:     Wed, 18 Feb 2009 22:19:36 GMT
            Vary:     Accept-Encoding
            Content-Encoding:     gzip
            Keep-Alive:     timeout=10, max=94
            Connection:     Keep-Alive
            Transfer-Encoding:     chunked
            Content-Type:     text/javascript
            Loading...
            css      [HTTP headers]  https://www.sharedhealth.com/.../eAHzMnTZCAAC-AFx      2/18/2009      gzip      202      (81.5K)      

            But I still can't figure out why these JS and CSS are not getting cached even though mod_expires is enabled on my Apache.

            Any further thoughts will be greatly appreciated.
            • 3. Re: Seam 2.0.2 SP1 + Richfaces 3.2.0 Performance Issues
              Stuart Douglas Master
              Cache-Control: no-cache, max-age=86400
              Pragma: no-cache


              Id say this is your problem, somewhere along the way this is getting added. The first step is to find out if it is jboss or IBM HTTP Server that is causing adding these headers.

              • 4. Re: Seam 2.0.2 SP1 + Richfaces 3.2.0 Performance Issues
                Timur Junussov Newbie

                Did u found, Where is


                Pragma: no-cache



                came out ?