Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-2185

s:selectItems performance issue with many combo-box items

    Details

      Description

      UISelectItems.asSelectItems() iterates over all combo box items and calls getLabel() and getDisabled() (usually value expressions) twice per entry:

      for (Object o : iterable)
      {
      initVar(o);
      selectItems.add(new javax.faces.model.SelectItem(o, getLabel() == null ? null : getLabel(), "", getDisabled() == null ? false : getDisabled()));
      destroyVar();
      }

      Using local variables can make a noticeable difference, if there are many combo box items.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                sbublava Stephan Bublava
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: