javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2494

JSF page performance degrades significantly as page size increases.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.11
    • Fix Version/s: 2.1.22, 2.2.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      « Hide

      Tomcat with Mojarra 2.1.11, JBoss 7.2 (Mojarra 2.1.11) running on Windows 7 64bit Sun/Oracle 1.6.0_32 java 32bit

      Description

      I cloned this from closed issue JAVASERVERFACES-2334 since the issue is getting worse with subsequent releases of Mojarra.

      This is from original post
      <--
      <f:ajax> tag degrades to performance of regular JSF 2 post as the xhtml page size increases. Attached is a sample xhtml page and backing bean that exhibits the problem. The page has 2 <f:form> tags the first one is very small and has the <f:agax> tag. The second <h:form> is large and contains a lot of html. Problem happens in GlassFish 3.1.1, JBoss 7.1 and Tomcat 7.0

      Using javax.faces.FULL_STATE_SAVING_VIEW_IDS makes no difference in performance. -->

      We have gone from 1.7 seconds for the attached example to 3.5 seconds by upgrading from Mojarra 2.1.5 to Mojarra 2.1.11. This is more than just an AJAX issue. Rendering of pages is slow and gets slower as the page size increases. By debugging Mojarra code I have found that for every "entry" in a page processed the tree is walked from the top node down. It finds the correct positions of the nodes to be modified by walking the tree 100s of times per page load. Is there a way Hash maps or other data structures could be used to avoid walking the full tree so many times per page load?

      We have many pages where just the rendering, Post or AJAX request takes several seconds even if there is no database access. There is no way to support multiple users when a page load takes 2 or more seconds at 100% CPU utilization. Rendering of the page should be in fractions of a second and not take longer than database access.

      1. AjaxTest.xhtml
        313 kB
        rogerk
      2. PageAjaxTest.java
        0.6 kB
        rogerk

        Issue Links

          Activity

          Hide
          Thomas Asel added a comment -

          I can confirm that there is a massive improvement with the latest release. I compared Mojarra 2.1.22 with MyFaces 2.1.11 and blogged about the results: http://blog.oio.de/2013/05/16/jsf-performance-mojarra-improves-dramatically-with-latest-release/

          Well done, guys

          Show
          Thomas Asel added a comment - I can confirm that there is a massive improvement with the latest release. I compared Mojarra 2.1.22 with MyFaces 2.1.11 and blogged about the results: http://blog.oio.de/2013/05/16/jsf-performance-mojarra-improves-dramatically-with-latest-release/ Well done, guys
          Hide
          balusc added a comment -

          FYI: we're currently facing an ajax rendering bug in a complex view built by JSTL c:if/c:forEach after upgrading 2.1.21 to 2.1.22. The state of a completely different component in the tree was been rendered instead of the desired one. We don't have the chance yet to nail it down to smallest possible example. Just informing that 2.1.22 introduced a bug like that.

          Show
          balusc added a comment - FYI: we're currently facing an ajax rendering bug in a complex view built by JSTL c:if/c:forEach after upgrading 2.1.21 to 2.1.22. The state of a completely different component in the tree was been rendered instead of the desired one. We don't have the chance yet to nail it down to smallest possible example. Just informing that 2.1.22 introduced a bug like that.
          Hide
          tdevos added a comment -

          I'm not sure if this is related but we are also experiencing a problem where calls behave differently. Please take a look on http://forum.primefaces.org/viewtopic.php?f=3&t=30570&p=98390#p98390.

          Show
          tdevos added a comment - I'm not sure if this is related but we are also experiencing a problem where calls behave differently. Please take a look on http://forum.primefaces.org/viewtopic.php?f=3&t=30570&p=98390#p98390 .
          Hide
          rogerk added a comment -

          Can you file a new issue for that potentially new problem?

          Show
          rogerk added a comment - Can you file a new issue for that potentially new problem?
          Hide
          balusc added a comment -
          Show
          balusc added a comment - @rogerk: https://java.net/jira/browse/JAVASERVERFACES-2892

            People

            • Assignee:
              Manfred Riem
              Reporter:
              rkite
            • Votes:
              31 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: