Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8DR#1, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      JSP and Facelets

      Description

      All generated ids come from the UIViewRoot, and are generally of the form: "j_id52" where the number after the "j_id" prefix is an incrementing integer. Every single component tree, for every user, in every JSF application will use the same set of ids, which makes them good for interning. I recommend capping what numerical range we'll intern, since dynamically <ui:include>'d components can get ever increasing ids, when what's included continually switches. Both JSP and Facelets applications should benefit.

      All we have to do is add the following code to D2DViewHandler.createView(FacesContext, String)'s inner class that's UIViewRoot sub-class, somewhere around line 221.

                  private static final int MAX_COUNT = 500;
                  private int count = 0;
                  public String createUniqueId() {
                      String uniqueId = super.createUniqueId();
                      if(++count < MAX_COUNT) {
                          uniqueId = uniqueId.intern();
                      }
                      return uniqueId;
                  }

        Issue Links

          Activity

          Hide
          Arturo Zambrano added a comment -

          committed to revision 17366

          Show
          Arturo Zambrano added a comment - committed to revision 17366

            People

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

              Dates

              • Created:
                Updated:
                Resolved: