[jboss-user] [JBoss Seam] - Re: Performence of Seam 2.0 app

sbublava do-not-reply at jboss.com
Tue Oct 30 08:37:20 EDT 2007


"MSchmidke" wrote : 
  | The most "complicated" thing on the page is a combobox with about 100 entries, all other of the about 15 components are really simple.
  | 
  | ...
  | 
  | Is s:selectItems / s:convertEntity a problem?
  | 

I just profiled on of my pages today and s:selectItems can indeed be a problem for combo-boxes with many entries.

The code below is from asSelectItems() in UISelectItems.java:


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

As you can see getLabel() and getDisabled() (usually value expressions) are called twice per entry. I've changed this locally to use local variables and it makes a noticeable difference.

In my case there are even more combo box entries - your mileage may vary ...

Thanks,
Stephan

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100222#4100222

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100222



More information about the jboss-user mailing list