Filipe Gomes
Filipe Gomes

Reputation: 188

Performance issues in complex page

I have a JSF page with PrimeFaces 5.1 and I'm experiencing performance issues in a complex page. The page has a common design: a paginated datatable, a tree for filtering, a panel with the selected item details and a menu with some actions on that item. The majority of these components are provided by PrimeFaces.

Profiling the application, I concluded that the DB queries are not the bottleneck but rather the restore view and render response phases. Moreover, the major factor in the delay seems to be the number of JSF components as opposed to the amount of data stored in the backing bean. Even AJAX requests with partial processing and rendering will take time in those phases.

How can I reduce the processing time, specially in the AJAX requests?

Upvotes: 0

Views: 1292

Answers (1)

Kukeltje
Kukeltje

Reputation: 12337

My 'short list':

  1. Use a recent version of your JSF library (especialy Mojarra > 2.1.21)
  2. Use partial processing (process="@this") (already mentioned by you)
  3. Don't use validation on ajax requests (immediate=true)
  4. Use partial submission (partial-submit="true")
  5. Be selective in what you update (Not an @form)
  6. Don't do any amount of work in a getter (and if you do, do it lazy)
  7. Don't use inline editing in the datatable
  8. Use native components in the datatable if you do cannot do 7
  9. Don't use loooooooooong select lists
  10. Use lazy loading for filtering, sorting and paging in datatables and use a page size value that is moderate (tnx @Vrushank, I forgot this)
  11. Don't use partial state saving in Mojarra with complex pages

Upvotes: 3

Related Questions