Improve Theme Load Performance

UI Components for JSF
Post Reply
alihasanash
Posts: 15
Joined: 30 Mar 2021, 16:17

11 May 2021, 04:21

I have a problem with page loading performance when I redirect to another page that uses a database (50-100 rows). In 1-2 second, the page will load the plain page HTML without Primefaces Theme.

How can I improve the performance?

Is there a way to hold the entire database until the Primefaces Theme views actually load?
Or at least can I create a page loading indicator icon so users don't have to see a plain HTML page like that?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

11 May 2021, 13:22

If you don't want to display the page untl it has finished rendering I used this trick https://stackoverflow.com/questions/955 ... 1#28129691

Also you should look to optimize your app with MOVE_SCRIPTS_TO_BOTTOM as well: https://primefaces.github.io/primefaces ... figuration
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

alihasanash
Posts: 15
Joined: 30 Mar 2021, 16:17

17 May 2021, 10:54

Melloware wrote:
11 May 2021, 13:22
If you don't want to display the page untl it has finished rendering I used this trick https://stackoverflow.com/questions/955 ... 1#28129691

Also you should look to optimize your app with MOVE_SCRIPTS_TO_BOTTOM as well: https://primefaces.github.io/primefaces ... figuration
Thanks for your reply!

I've tried all your suggestions and I found a main problem, apparently it's not about the database.
The main problem is plain HTML still appeared before CSS.

Any solution for this?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

17 May 2021, 13:40

That should not be possible if you use this trick: https://stackoverflow.com/questions/955 ... 1#28129691

You should get a white screen until the whole page has rendered and then it will snap appear if you have done it correctly.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests