I, perhaps, made a wrong choice of going with a Component-based Framework like JSF for an internet facing, high traffic web application. Development with JSF has although been easier but what I fear now is whether JSF would allow me that scalability & performance with all it fundamental problems & issues. State saving in a high traffic web app, does that make sense at all!?

How do I tune up my JSF app now to make it perform better under heavy load? I am already trying to reduce the state / component tree by reducing the no of components on page. What are other things I can tune up to make JSF app perform better ?

  • Would you please tell us (more than one year later) about your application ? What solutions did you choose ? Commented Oct 21, 2013 at 21:02

4 Answers 4


It would be a good idea to see what session scoped beans are necessary for the session and which can just be request scoped. Further, try to see where you can realistically clean up session scoped beans when you have finished with them as this will reduce session size.

If it is server memory that is out of control you can configure it to store session state on the client side, however this will increase the size of requests and responses through your servers so bandwidth may take a hit.

Likewise if bandwidth is the bottleneck then try storing session state on the server to reduce the request and response sizes.

Martijn is correct however, you should take the time to properly evaluate your performance bottlenecks with a proper profiling tool before pointing your finger at JSF. This very well may also be a database issue as well.


What performance characteristics are you trying to achieve?

  1. You should start with the threshold that is acceptable. For example, you don't want users to wait for more than 3 seconds for the login page to load.
  2. Then you need to create a time budget. For example, set timing points at the boundaries of your application (browser, application, DB etc) so you know exactly where the time is being spent.

Only then should you look to tune the individual components within your application architecture. JSF might not even be a problem :-)


There is one (possibly) significant performance problem with JSF: The creation of the "View" (the server-side representation of the page structure) is quite expensive.

At least the reference implementation (Mojarra) does this for every request. This means that there is a high (as in several 100 ms) overhead if you have a large page, even if you only update a part via AJAX.

One possible solution is "stateless JSF": http://industrieit.com/blog/2011/11/stateless-jsf-high-performance-zero-per-request-memory-overhead/

It's non-standard, but seems to work well.


A good start to understand how JSF performance works is take a look at this blog:

Understanding JSF 2 and Wicket: Performance Comparison

There is a test application with everything you need to tune JSF properly. It is quite simple because you usually only need to set javax.faces.PROJECT_STAGE web config param to Production and JSF will configure for you, but there are some additional config parameters that helps just a little.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.