JSF performance tuning

I use Mojara 2.0.3 and PrimeFaces 2.2.

I have read many posts in this topic and found some very good suggestions ( For example, don’t use db calls, etc. in the getter) and use them, but our application still takes ~3 seconds to render the response.

I tested it and the 6th life cycle (rendering phase) is The largest resource consumer. We mainly use built-in or composite components. I want to know whether it is good or bad to replace some of them with simple html tags (mainly for design without using any functions).

For example:
Insulation
< p:outputPanel styleClass ="myClass"> …some codes…< / p:outputPanel>

Use this

...some code...

We have a huge view of hundreds of components and thousands of DOM elements, and I can become a renderer Stage blocker.

Edit:

After I removed almost all “useless” components, we experienced huge performance growth. Response time and response size. Average response time changed from ~3 seconds reduced to ~2.2 seconds. Amazing…
So the conclusion is: use less, much more 🙂

According to Chapter 1 of Core Java Server Faces, pure HTML (static) is passed before the encoding phase of JSF tags.

If you have something that does not need to be exchanged with Backing Bean JSF tags, I suspect that you can enjoy small performance gains by restricting static data to vanilla HTML.

The encoding and decoding phrases of the JSF life cycle are converted between Component mark-up and vanilla HTML. If you are using a component to hold that you don’t loop on the table and fill rows (for example) with things like , then it’s worth it for you. Compared to

, it Do not use ajax or bind to the backing bean. HTML elements.

In short, if you don’t need to use JSF as a Controller, don’t be afraid to use plain old HTML in your JSF document.

I use Mojara 2.0.3 and PrimeFaces 2.2.

I have read many posts in this topic and found some very good suggestions (e.g. don’t use db calls in the getter, etc.) and Use them, but our application still takes ~3 seconds to render the response.

I tested it and the 6th life cycle (rendering phase) is the largest resource consumer. We mainly use built-in or Composite components, I want to know whether it is good or bad to replace some of them with simple html tags (mainly used for design without using any functions).

For example:
insulation
< p: outputPanel styleClass = "myClass"> …some code…< / p: outputPanel>

Use this

.. .some code...

We have a huge view of hundreds of components and thousands of DOM elements, and I can be a blocker in the rendering phase.

Edit:

After I removed almost all “useless” components, we experienced a huge performance increase. Response time and response size. The average response time decreased from ~3 seconds to ~2.2 seconds. Amazing…
So the conclusion is: less use, much more:)

According to Chapter 1 of Core Java Server Faces, pure HTML (static) is marked in JSF Is passed before the encoding stage.

If you have some JSF tags that do not need to be exchanged with Backing Bean, I suspect that you can enjoy a small performance improvement by restricting static data to vanilla HTML.

/p>

The encoding and decoding phrases of the JSF life cycle are converted between Component mark-up and vanilla HTML. If you are using a component to save you will not loop on the table and fill rows (for example) with < h: outputText> and the like, then it’s worth it for you. Compared to

, it doesn’t use ajax or bind to backing beans. HTML elements.

In short However, if you don’t need to use JSF as a Controller, please don’t be afraid to use plain old HTML in JSF documents.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2606 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.