1. javaserverfaces-spec-public

reduce number of times rendered attribute value expression is evaluated


    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Components/Renderers
    • Labels:
    • Status Whiteboard:

      size_medium importance_medium

      size_medium importance_medium


      The rendered attribute is an Achilles heal of JSF performance. JSF abuses the
      value expression used in rendered attributes. It's expected that the value
      expression is going to be resolved more than once on a request because by nature
      it is a pass-through construct and because the value it is representing is
      likely contextual (meaning it can change as the application changes). However,
      in the case of the render attribute, it's a little bit out of control. Any
      getter method bound to a rendered attribute is being called way too many times.
      This could easily be solved by being more frugal about when it is consulted.

      For example, the rendered value expression is resolved in encodeChildren,
      encodeBegin (or encodeParentAndChildren) and again at encodeEnd of most
      components. We should state that when a component is first addressed during
      encoding (perhaps in encodeBegin) that is when the rendered attribute should be
      evaluated. Then the resolved value simply cannot change again in that phase.
      (The exception would be a row in UIData, which the rendered attribute would need
      to be resolved once per component per row).

      We should also consider having encodeAll check the rendered attribute and not
      encodeBegin. Or, we could keep the current contract the same but deprecate
      encodeBegin, encodeChildren, encodeEnd and getRendersChildren so that most
      people start using encodeAll instead so that isRendered gets called only once
      per component per render phase execution.


        rogerk created issue -
        Ed Burns made changes -
        Field Original Value New Value
        Original Estimate 3 days [ 259200 ]
        Remaining Estimate 3 days [ 259200 ]
        Assignee rogerk [ rogerk ] Ed Burns [ edburns ]
        Ed Burns made changes -
        Fix Version/s 2.3 [ 16372 ]
        Fix Version/s 2.2 [ 10403 ]
        Ed Burns made changes -
        Assignee Ed Burns [ edburns ]
        Ed Burns made changes -
        Priority Major [ 3 ] Trivial [ 5 ]
        Fix Version/s 2.3 [ 16372 ]
        Manfred Riem made changes -
        Priority Trivial [ 5 ] Critical [ 2 ]
        Manfred Riem made changes -
        Affects Version/s 2.2 [ 10403 ]
        Affects Version/s 2.2 Sprint 8 [ 10395 ]
        Manfred Riem made changes -
        Assignee Manfred Riem [ mriem ]
        Manfred Riem made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Manfred Riem made changes -
        Status Resolved [ 5 ] Closed [ 6 ]


          • Assignee:
            Manfred Riem
          • Votes:
            15 Vote for this issue
            14 Start watching this issue


            • Created:

              Time Tracking

              Original Estimate - 3 days
              Remaining Estimate - 3 days
              Time Spent - Not Specified
              Not Specified