Can any one list out the tips to tune JSF WebApp @ its best.
-
1Depends strongly on where your bottlenecks are. – Thorbjørn Ravn Andersen Aug 26 '10 at 16:21
-
This is very general question. – Aug 26 '10 at 16:39
2 Answers
Never put logic into your getters. They are called multiple times and should only return something already populated by another method. For example if you are chaining drop-downs together use an a4j:support tag on the first one with an action attribute that loads the data which is then retrieved when you reRender the second one.
Use the ajaxSingle="true" unless you actually want to send the whole form back to the server.
Don't use a rich component if you only need a normal one. For example don't use rich:dataTable unless you are making use of some of the features that it has over and above h:dataTable.Consider using immediate=true attributes on elements where you do not need validation Avoid displaying large tables to user.
Use pagination Do not over complicate EL expressions, code them in Java in backing bean

- 237,923
- 42
- 401
- 438
-
2Some of the comments in JSF BestPractices are old. for example the usage of c:if - it's not recommended to use JSTL in JSF. it also breaks some functionality like ViewScope in JSF2 – Dejell Aug 26 '10 at 13:34
-
3
-
1http://stackoverflow.com/questions/628570/jsf-tuning this also seems a relevant discussion – Anand Sunderraman Jan 11 '12 at 09:15
Moving to Stateless JSF would offer a great performance boost. Now it's possible to use JSF entirely stateless. See this blog & this issue. A payoff is that you can't create views dynamically (e.g. by binding, JSTL tags, etc), nor manipulate it after creation.
A Stateless JSF operation mode would be incredibly useful for high-load applications and architectures:
This has previously been suggested by Jacob: http://weblogs.java.net/blog/jhook/archive/2006/01/experiment_goin.html
This would help JSF ditch the stigma of "slow and memory hog," and help keep up with current tech trends (stateless architectures.)

- 25,853
- 63
- 179
- 294
-
-
2stateless JSF is just an extension to mojarra implementation of JSF. So your pages would load superfast as the view is not rebuit/modified everytime, & you also say goodbye to those stale views(incase you used server state saving mode) while you enjoy all the other advantages of fast & easy development with JSF. Checkout the link for details – Rajat Gupta Aug 21 '12 at 07:37