2 Replies Latest reply on Mar 12, 2009 9:38 AM by Julien Kronegg

    Taking Performance Up a Notch

    Greg Zoller Newbie

      Hello,


      I've got a pretty complex page that uses a lot of Richfaces widgets (including a data table w/Richfaces widgets in the table), jQuery candy, and plenty of ajax and dynamic reRendering going on.  It's a great page, but its pretty heavy.


      I want to start decomposing where I can take performance to the next level.  Two candidates for consideration so far are:


      Investigate how others have successfully used @BypassInterceptors to speed up the server side


      and


      Investigate the feasibility of ignoring Richfaces in favor of 100% jQuery for ajax.


      I notice that Richface's widgets can be quite fat in spots and I have seen a boost by using jQuery equivalents as long as I don't get carried away, but there's always a little kludge integrating jQuery code w/Richfaces to get data manipulated in the client javascript back to the server via ajax.


      Has anyone tried using pure jQuery ajax w/Seam?  Would it buy me anything performance-wise?  Richface's ajax support is pretty easy to use.


      Thanks for any shared experiences.
      Greg

        • 1. Re: Taking Performance Up a Notch
          Stuart Douglas Master

          Just a few things that I have found on optimising my pages:


          - use short id's. I know this sounds stupid but in one of my pages that used a large and complicated rich:tree the total page size was reduced by 50% when I changed from descriptive ids (tree1,container1 etc) to single character id's. Even for complicated nestled database you can see a significant reduction in generated page size by shortening your id size.


          - Use a profiler, without one you are basically guessing. This will allow you to check for excessive calls to seam interceptors.


          - It is possible to configure richfaces to serve all its javascript in a single cachable file, so it is only loaded on the first request, this is generally a good idea.


          - do not make EL calls on a seam component in a large dataTable or repeated section unless it as been anotated with @BypassInterceptors. The seam interceptors kill performance if you are making lots of calls.


          - be careful what you are sending back to the server on each ajax request. If you have a large datatable with input widgets in each row processing all these inputs on the server side can take a while.


          -gzip or deflate content to reduce size when being transmitted over the wire.


          Thats all I can think of off the top of my head, if you want more specific advice you are going to have to post the specific section of the page you are having performance problems with.