Jakarta Faces performance tuning

created onMarch 29, 2023

approaches to apply right from the start

  • prefer HTML over JSF tags.
  • no logic in getters (can be called multiple times) – especially for the rendered attribute.
  • avoid logic in EL expressions.
  • avoid using h:outputText. instead, use an EL expressions.
  • if you need to escape HTML, it’s better to use an EL function.
  • use AJAX where possible.
  • only process and update components that are really required to be updated.
  • use where posssible. Avoid using , and other long lived scopes.

approaches for performance tuning

  • cache data, which is required multiple times in the same view, in @RequestScoped beans.
  • split your backing beans. It’s better to have a separate bean for logic and a separate bean for values which are required for multiple requests (, …).