In our comparative study about the runtime behavior of both JSF implementations we came to the conclusion that Apache MyFaces performs significantly better on large component trees than the reference implementation Oracle Mojarra. The duration Mojarra took to step through the JSF lifecycle was increased by factors compared to MyFaces, e.g. a view containing 1.000 components took more than 5 times longer to render with Mojarra. This led to the assumption that the overall performance of Mojarra-based JSF applications may improve notably by simply switching the implementation to MyFaces.
However, Mojarra is the default JSF implementation e.g. in JBoss AS, so it is widely used in the industry today. Switching the implementation is not always a desirable solution, so it was just a matter of time until the Mojarra team had to deal with the observed performance degradation . Mojarra 2.1.22 was released on May 8th, and it was announced to contain a fix for https://java.net/jira/browse/JAVASERVERFACES-2494.
So the question is: “How big is the improvement?”. To answer this question we repeated some of the performance measurements with the latest releases of Mojarra and MyFaces and compared them to the results taken earlier.
As you can see, until a total view size of around 1200 components the time taken by Mojarra and MyFaces to complete the JSF Lifecycle is close to identical. Mojarra even gained a small improvement of about 8% until a component tree size of 1.000 components is reached. The dashed red line marks the results taken earlier, clearly showing that Mojarra had issues with larger sized component trees.
This time there are two conclusions to be drawn:
- Referred to the size of the component tree, both implementations behave very similar. Developers facing performance issues with large component trees may take other measures to improve their applications performance than to switch the implementation.
- An upgrade to the latest Mojarra release is heavily advised due to the dramatic performance improvements.