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

          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Arturo Zambrano [ artzambrano ]
          Ken Fyten made changes -
          Fix Version/s 1.8 [ 10161 ]
          Ken Fyten made changes -
          Fix Version/s 1.8DR#1 [ 10141 ]
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Ken Fyten made changes -
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Fix Version/s 1.7.2 [ 10130 ]
          Ken Fyten made changes -
          Link This issue blocks ICE-3083 [ ICE-3083 ]
          Ken Fyten made changes -
          Summary Intern generated ids Memory: Intern generated ids
          Fix Version/s 1.7.2 [ 10130 ]
          Security Private [ 10001 ]
          Arturo Zambrano made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Deryk Sinotte made changes -
          Assignee Deryk Sinotte [ deryk.sinotte ] Arturo Zambrano [ artzambrano ]
          Mark Collette made changes -
          Field Original Value New Value
          Security Private [ 10001 ]
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Mark Collette created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved: