ICEfaces
  1. ICEfaces
  2. ICE-3730

Optimise UIComponent.getRenderer() accesses

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.8DR#1
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All (JSF 1.2?)

      Description

      Throughout the JSF framework, UIComponent objects delegate behaviours to their Renderer, which is accomplished in UIComponentBase by:

          Renderer result = context.getRenderKit().getRenderer(getFamily(), getRendererType());

      The call to FacesContext.getRenderKit() takes up the majority of acccessing the Renderer. In JSF 1.2, their FacesContextImpl class does the following for getRenderKit():

           private RenderKitFactory rkFactory;
           private RenderKit lastRk;
           private String lastRkId;

           public RenderKit getRenderKit() {
               assertNotReleased();
               UIViewRoot vr = getViewRoot();
               if (vr == null)
                   return (null);
               String renderKitId = vr.getRenderKitId();
               if (renderKitId == null)
                   return null;
               if (renderKitId.equals(lastRkId))
                   return lastRk;
               else {
                   lastRk = rkFactory.getRenderKit(this, renderKitId);
                   lastRkId = renderKitId;
                   return lastRk;
               }
           }

      Ours is implemented a bit differently, which brings up questions of correctness. But, regardless, the key optimisation involves caching the last RenderKit, as well as the RenderKitFactory.

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup.

          Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf

          If the issue persists with the current ICEfaces release, please create a new JIRA for it.

          Show
          Ken Fyten added a comment - Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup. Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf If the issue persists with the current ICEfaces release, please create a new JIRA for it.

            People

            • Assignee:
              Unassigned
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: