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: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Some of our more complex component will render out sub-parts of themselves with ids derived from the component's clientId, usually with a suffix appended. These suffixes can be needlessly verbose, making the server and browser DOMs unnecessarily large, and slowing network transmission and parsing times.

      For example, take <ice:selectInputDate>, whose Renderer uses the following suffixes:

          private static final String CALENDAR_TABLE = "_calendarTable";
          private static final String CALENDAR_BUTTON = "_calendarButton";
          private static final String CALENDAR_POPUP = "_calendarPopup";
          private static final String HIDDEN_FIELD_NAME = "showPopup";
          private static final String DATE_SELECTED = "dateSelected";

          private static final String SELECT_MONTH = "_selMo";
          private static final String SELECT_YEAR = "_selYr";
          private static final String PREV_MONTH = "_prevmo";
          private static final String NEXT_MONTH = "_nextmo";
          private static final String PREV_YEAR = "_prevyr";
          private static final String NEXT_YEAR = "_nextyr";

          private static final String CALENDAR = "_calendar";
          private static final String CALENDAR_CLICK = "_calendarClick";
          private static final String ROOT_DIV = "_rootDiv";

      These suffixes are nicely descriptive, but could be easily shortened. All component should be examined for possible optimisation. Care should be taken to not break Javascript which might rely on these suffixes.

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          Let's start with just ice:selectInputDate and ice:tree to see what the gain in performance/memory is and relative damage to QA test scripts, etc.

          Also, let's be aggressive with the id suffixes so that we save as much length as possible (at the expense of human readability). Ex. _calendarTable = _ct

          Show
          Ken Fyten added a comment - Let's start with just ice:selectInputDate and ice:tree to see what the gain in performance/memory is and relative damage to QA test scripts, etc. Also, let's be aggressive with the id suffixes so that we save as much length as possible (at the expense of human readability). Ex. _calendarTable = _ct
          Hide
          Adnan Durrani added a comment -

          Size of calendar markup:
          Before = 21.1 KB (21,636 bytes)
          After = 19.1 KB (19,588 bytes)
          trunk revision: 17466

          Show
          Adnan Durrani added a comment - Size of calendar markup: Before = 21.1 KB (21,636 bytes) After = 19.1 KB (19,588 bytes) trunk revision: 17466
          Hide
          Adnan Durrani added a comment -

          Changes:
          _calendarTable = _ct
          _calendarButton = _cb
          _calendarPopup = _cp
          showPopup = sp
          dateSelected = ds

          _selMo = _sm
          _selYr = _sy
          _prevmo = _pm
          _nextmo = _nm
          _prevyr = _py
          _nextyr = _ny

          calendar = c
          _calendarClick = _cc
          _rootDiv = _rd

          Show
          Adnan Durrani added a comment - Changes: _calendarTable = _ct _calendarButton = _cb _calendarPopup = _cp showPopup = sp dateSelected = ds _selMo = _sm _selYr = _sy _prevmo = _pm _nextmo = _nm _prevyr = _py _nextyr = _ny calendar = c _calendarClick = _cc _rootDiv = _rd
          Hide
          Adnan Durrani added a comment -

          Size of the tree markup:
          Before = 20.7 KB (21,246 bytes)
          After = 19.6 KB (20,118 bytes)

          Changes:
          treeNodeDiv = nd
          -div-root = -d-rt
          child = c
          -child = -c
          div = d

          revision 17467

          Show
          Adnan Durrani added a comment - Size of the tree markup: Before = 20.7 KB (21,246 bytes) After = 19.6 KB (20,118 bytes) Changes: treeNodeDiv = nd -div-root = -d-rt child = c -child = -c div = d revision 17467

            People

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

              Dates

              • Created:
                Updated:
                Resolved: