2 Replies Latest reply on Mar 27, 2010 7:29 PM by Dan Allen

    Seam 3: performance improvements

    Arbi Sookazian Master

      What performance improvements are expected in conjunction with JSF 2.0 specifically?  As I understand it, Weld, which is the new Seam 3 core, does not have an outjection facility via @Out like in Seam 2.x, but there is the ability to outject via @Produces producer methods.  Has Seam 3 reverted back to static constructor/setter injection (ala Spring) or maintaining dynamic DI?


      I believe the GKing/Weld forum post stated that Weld uses injection on object instantiation only but also uses proxies so the objects that are injected are not stale like in Spring or other static DI...

        • 1. Re: Seam 3: performance improvements
          Stuart Douglas Master

          Seam 3 uses weld for the DI core. Weld uses proxies for injection, the proxy is injected statically and then all calls on the proxy are passed through to the correct underlying bean.


          • 2. Re: Seam 3: performance improvements
            Dan Allen Master

            Adding to what Stuart wrote...



            Arbi Sookazian wrote on Mar 24, 2010 22:44:


            What performance improvements are expected in conjunction with JSF 2.0 specifically?


            The performance improvements in JSF 2 revolve primarily around the use of partial state saving of the UI component tree.


            Weld brings performance improvements to Seam 3 since all the bean metadata, injection points and observer methods (and so on) are calculated at startup. This work doesn't take long, but if it were done repeatedly, then it would eat up valuable time...hence the improvement. Also, reduced dependence on interceptors helps reduce overhead of method calls.



            As I understand it, Weld, which is the new Seam 3 core


            Correct.



            ...does not have an outjection facility via @Out like in Seam 2.x, but there is the ability to outject via @Produces producer methods.


            The majority of people agree this is a more sound strategy. What I'm interested in hearing are the experiences of switching over. Those will come out in time.