Foren

Liferay 6.2 slow page-load times

James Coll, geändert vor 10 Jahren.

Liferay 6.2 slow page-load times

New Member Beiträge: 11 Beitrittsdatum: 26.04.11 Neueste Beiträge
After migrating to Liferay 6.2, we sometimes see page load times that exceed 10 minutes after deploying a new version of a theme.

Even out-of-the-box pages are afflicted if the Liferay server is restarted. It took 118 seconds to load /html/themes/control_panel/css/custom.css. And that request for CSS, along with many other parallel CSS requests, didn't even start for the first 43 seconds while aui.css was loaded.

Analyzing network traffic clearly shows everything loads instantly, except for CSS files.

All the time is spent loading CSS files, and the CPU is pegged at 30% - 100% the whole time.

Of course page loads get faster after Liferay's Sass-cache is stable, but that does nothing for the productivity of the poor developer.

How can we quickly build and deploy and use a theme? The loss of productivity is hard to explain to management.
min huang, geändert vor 10 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 18 Beitrittsdatum: 15.11.12 Neueste Beiträge
Hi

James Coll ! I have the same problem as you ,do you fix it?
James Coll, geändert vor 10 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 11 Beitrittsdatum: 26.04.11 Neueste Beiträge
I've been working with Liferay's Enterprise Customer Support on this issue.

They have reproduced the problem, but to a lesser degree, on a clean Liferay 6.2 running locally on their hardware accessing the Control Panel for the first time after a server restart. They do see a delay of a few seconds loading certain CSS files like aui.css. On my company-supplied hardware (which is nothing to be proud of), I've seen delays as long as 20 seconds.

Their position is that the initial load takes longer because Liferay is "caching" the CSS on the server-side. This is normal and expected and no big deal. The longer delays I experience have something to do with my custom theme (which has a lot more CSS) or my hardware (which is not the best money can buy), and therefore there is no problem for them to fix.

My position is that the browser will load and cache CSS files from localhost in milliseconds, and any Liferay-induced delay (even if one-time and even if only few seconds) is unacceptable. It is unacceptable because it is CPU-intensive and the delay can grow with theme-customization and has no upper bound.

We are currently at an impasse.

If you in the community are experiencing this problem too, then Liferay needs to hear from you.
James Coll, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 11 Beitrittsdatum: 26.04.11 Neueste Beiträge
UPDATE:

Liferay Tech Support has acknowledged long initial page-load times due to unnecessary Sass compilation of CSS files on the server. They hope to improve the server's performance in a future release but they will not fix version 6.2. Very disappointing.
min huang, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 18 Beitrittsdatum: 15.11.12 Neueste Beiträge
Hi,James Coll

Thanks for you update,it is very disappoint! do you have any ideas about it?
i want cut some css and js from the theme,i think it will have some improvement ,but it will lose some new functions....

and i will try it those days and if i have any update ,i will share you .
James Coll, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 11 Beitrittsdatum: 26.04.11 Neueste Beiträge
Hello Min,

Our team's new strategy regarding static HTML/CSS/JS content is to use an ExpressJS web server and a little Apache proxy magic to bypass Liferay.
min huang, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 18 Beitrittsdatum: 15.11.12 Neueste Beiträge
Hi James!

Thanks for your reply, can you hare more detail information about it to me,if it can be shared ?
Thanks, my email is 1010huangmin@gmail.com.
Mathieu Durand, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 2 Beitrittsdatum: 07.10.13 Neueste Beiträge
I did a little test and changed the RubyExecutor to execute the task one by one instead of in parallel using a thread poll (I synchronized the eval method), and the performances are much better. Maybe there is an issue with the jRuby lib and parallel execution. By the way, Liferay doesn't seem to be using the latest version of jRuby. I haven't tried updating jRuby.
thumbnail
Daniel Tyger, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

Regular Member Beiträge: 105 Beitrittsdatum: 06.02.13 Neueste Beiträge
Mathieu, Can you share what we need to do to improve the speed? - In what file(s) do we make changes...?
thumbnail
Amit Doshi, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Hi Mathieu ,

Can you please inform us, in which particular file we need to do changes ?

Any help will be appreciated.

Thanks & Regards,
Amit Doshi
thumbnail
Liferay S, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

Junior Member Beiträge: 53 Beitrittsdatum: 12.04.12 Neueste Beiträge
Hi All,

Need your inputs on the same.
One of our customers is experiencing the slowness once they delete the temp and work directory.

The slowness is experienced only when the home page is loaded for the very first time after deleting the temp and work directories.
This slowness is even experienced when the Control Panel page is loaded, but only for the very first time. Thereafter everything works absolutely fine.

Thanks,
thumbnail
Alessandro Lachina, geändert vor 9 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 24 Beitrittsdatum: 12.06.13 Neueste Beiträge
I don't know if our problem is the same but after redeploy a war of custom theme server goes for several minute (more then 10) to 99 %CPU and page is not available..
I think is the same.
We are on a test enviroment, 6.2 CE GA2, with only 1 user (me..)
I hope it will be fixed before we go on production
Matthieu san, geändert vor 8 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 2 Beitrittsdatum: 22.05.15 Neueste Beiträge
Hello,

I've got the same issue. When i go to the control panel I have to wait 20 secondes (receiving time) for only 6.6KB

Using firebug i can see that the request GET /control_panel?refererPlid=XXXX is taking the overall time.

when i reload the page "control panel" i wait 20 secondes (waiting time).

Do you have any way to solve this ?

I m on liferay 6.2 ga2
tomcat 7

thanks a lot
James Coll, geändert vor 8 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 11 Beitrittsdatum: 26.04.11 Neueste Beiträge
I started this thread more than a year ago, and, since then, we've done some work to alleviate the pain. Our Liferay instances now perform much closer to the way an uncustomized Liferay instance performs. Our first-time page loads are less than 1 minute and subsequent page loads are just a few seconds. That is still egregiously sluggish, but better than the 10-15 minute first-time page loads we used to endure.

Our first solution, unfortunately, is proprietary and won't help anyone else. We abandoned Liferay's theming. Our portal-normal.vm now delivers a blank page with a few portlet placeholders, and then our Javascript goes to work constructing the page using HTML templates and CSS served from an ExpressJS web server.

Our second solution, which I stumbled upon entirely by accident, just might help others. We use a Hook project to load a LAR file with a set of pages that all link to our custom (but nearly empty) Theme. But the Hook project always loaded before the Theme (alphabetical order). Then, on first page load after startup, Liferay always recompiled any and all CSS files (including dozens of individual AlloyUI & Bootstrap CSS files) using SASS, which takes 10-15 minutes. It turns out that Liferay provides a way to ensure that the Theme project gets loaded before the Hook project. In the Hook project, I added the following line to the liferay-plugin-package.properties:
required-deployment-contexts=my-custom-theme

With that dependency in place, our custom Theme project loads before the Hook project, and the custom Theme is available when the LAR file loads, and then, as if my magic, Liferay figures out that it doesn't need to recompile every CSS file it encounters.

Still, Liferay is slow, and 20 seconds to load a Control Panel page after server startup is embarrassingly normal. Subsequent page loads should be faster, but don't expect the responsiveness of amazon.com or facebook.com.
Matthieu san, geändert vor 8 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beiträge: 2 Beitrittsdatum: 22.05.15 Neueste Beiträge
Hello James,


Thanks a lot for your reply. I will try this properties setting.

regards,
Matthieu
Radu Toader, geändert vor 7 Jahren.

RE: Liferay 6.2 slow page-load times

New Member Beitrag: 1 Beitrittsdatum: 10.05.16 Neueste Beiträge
If you are on linux, you should try modifying the limits.conf file


user hard nofile 32000
user soft nofile 32000
user hard nproc 32000
user soft nproc 32000
user hard core 32000
user soft core 32000

max value is 65535 but 32000 is enough

user could be *, in which case will apply for all users. The most important settings is nofile, because it allows more opened files per user
this worked for me.
thumbnail
Daniel Tyger, geändert vor 10 Jahren.

RE: Liferay 6.2 slow page-load times

Regular Member Beiträge: 105 Beitrittsdatum: 06.02.13 Neueste Beiträge
I am also seeing this behavior.

Not sure if you are using the Liferay IDE / Remote Server Connector, but I am also noticing that successive theme redployments are not actually pushing all the changes to the server... You, too?

Bump!