Rendering is the most expensive task at any way. But 2 seconds is pretty a lot (those 2 seconds before rendering also by the way, sounds like poor DB performance). Aren't you heavily using conditionals inside the UIData
component? E.g. h:inputText disabled="#{bean.disabled}"
and so on.
It's hard to tell the best path to improve performance and it's hard to improve this in the JSF side. Aren't you unawarely including network and/or webbrowser speed in the complete picture? Poor network bandwidth and a small server side response buffer might block the one and other. Poor table rendering performance in the webbrowser might block one and other. MSIE is known to be a disaster in table rendering performance. Try FireFox or Chrome instead.
At any way, replacing ui:repeat
with c:forEach
isn't going to help much. Even more, the c:forEach
is a tad less efficient since it invokes the items
on every iteration instead of caching it.