1 Reply Latest reply on Oct 26, 2007 1:08 PM by pmuir

    s:link performance issues

    dmitriy.lapko

      Did anybody compared performance of s:link and h:commandLink?

      I traced my application and found that switching from s:link to h:commandLink produces decrease of RENDER_RESPONSE phase from 520ms to 250ms...

      Here is the code:

      <s:link view-id="/item.xhtml" action="#{itemManager.viewItem}" value="#{item.title}">
       <f:param name="itemId" value="#{item.id}" />
      </s:link>
      


      comparing with:

      <h:commandLink action="#{itemManager.viewItem}" value="#{item.title}">
       <f:param name="itemId" value="#{item.id}" />
      </h:commandLink>
      


      JProfiler showed that it looks like param for link is evaluated twice! Once - for getting value, second - for getting its type to product converter

      Also there should be other problems, because even double evaluation of item.id could not be so terrible...

      And another point - when I tested the same code on small test page without any params of page in pages.xml - the difference was not so significant.

      I have a picture from JProfiler with timing for this issue - I just cannot attach it to this post.