I've developed a web application using MyFaces 1.2.6 and Richfaces 3.3.1GA (just upgrated). Despite the ease of use, I found out that Richfaces components are very slow.
I also found out that they didn't really take advantage of the browser caching mechanism, they keep sending some lousy JS file every request and other things. I really would like to apply some rules described in the "High PErformance WEbsites" book, but I can't change de generated js and HTML code.
Does anyone have some tips for frontend performance tuning using Richfaces?
Thanks.
Have a read of this article.
Are you using Firebug + YSlow to check what is being stored in the cache? Using the web.xml org.richfaces.LoadScriptStrategy
setting, you can tell Richfaces to either:
But some basic principles :
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With