3 Replies Latest reply on Mar 7, 2009 7:40 AM by P C

    Interface.js Permformance Question

    P C Newbie

      Hi,


      I make use of seam remoting quite a bit and for a particular page I would include interface.js 10 to 15 times to generate both executable client stubs and type client stubs. For example:


      ../inteface.js?customAction
      ../interface.js?customAction1
      ../interface.js?customAction2
      ...


      ../interface.js?com.test.test1
      ../interface.js?com.test.test2
      ...


      I don't really understand the process in which these stubs are generated so I want to find out whether there is going to be a performance issue if I include interface.js multiple times in the page.  I assume the seam client would contact the server to generated the stubs for each of the SEAM component or java beans, but are they batched together to generate these stubs? Is it just one single round trip involved or are multiple round trips involved?  Are only the requested stubs generated?  I just want to find out how these stubs are created so that I can understand if there are any potential performance issues.


      Thanks a bunch!


      Paul

        • 1. Re: Interface.js Permformance Question
          P C Newbie

          Can someone from the SEAM team comment on this?  Do I have any reason to worry about performance?

          • 2. Re: Interface.js Permformance Question
            Duncan Stockdill Newbie

            You definitely want to minimize calls to interface.js.  We've done a lot of tuning on our app, and interface.js is probably one of the bigger bottlenecks now.  The reason is that each call to interface.js creates a conversation so the response for each request is relatively slow compared with a static javascript file.  There's also no easy means of getting the browser to cache requests to interface.js unlike images and other static content.  To minimise calls you can specify multiple components in a single call to interface.js:




            <script type="text/javascript" src="#{basePath}/seam/resource/remoting/interface.js?customAction&amp;customAction1&amp;customAction2"></script>


            • 3. Re: Interface.js Permformance Question
              P C Newbie

              Thanks alot for your tip!  This is what i was worried about all along.  Much appreciated!!! :)