views:

37

answers:

1

In analysing the performance of a JSF2 (Mojara) page returning 200 tabular rows I'm seeing 50% of the time taken to respond being in just rendering. For the 4 seconds on a dev box, 2 are purely down to the rendering of this page.

What is the best path to improve performance?

(I've been told to replace ui:repeat with jstl code?)

Due to the complexity of the JSF object tree - the profiler isn't telling me much.

A: 

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.

BalusC