Message Boards

Slow response JSP render Liferay 7.2 CE

Tommaso Boldrin, modified 2 Years ago.

Slow response JSP render Liferay 7.2 CE

New Member Posts: 2 Join Date: 10/11/21 Recent Posts

Hi,
we have recently installed the 7.2 CE version of liferay going from a 6.5.
We immediately noticed some evident slowdowns it would seem to render the jsp com shown in the attached image.
Is there any solution to speed up that operation or is it just a consequence of generic slowdowns?


 

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Slow response JSP render Liferay 7.2 CE

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

#1 please continue to go to 7.4 - even before you settle this problem.

#2 I've not seen excessive JSP rendering/compilation times, specifically not over an extended time. There might be a one-time hit for the first compilation of a page, but newer versions of Liferay seem to come with the JSPs precompiled (or compilation sped up dramatically).

I'm not sure how JSPs are compiled/loaded in the OSGi times, but in the past I've seen problems when the server's (filesystem) time assumed a different timezone than the application's process - at least for fresh installs, this could lead to JSPs being compiled "in the past", so that they will be recompiled on each access until the UTC-difference passed. Try again tomorrow, to make extra extra sure you're not running into such an issue.

Or just continue to upgrade to the latest 7.4 and see if it goes away by itself.

Tommaso Boldrin, modified 2 Years ago.

RE: Slow response JSP render Liferay 7.2 CE

New Member Posts: 2 Join Date: 10/11/21 Recent Posts

Hi Olaf,
I checked but it has not changed much today, the thing that I do not explain is why in moments of loading should continue to recompile the jsp? Isn't there some mechanism that can limit this activity? A particular configuration to be set?

Unfortunately at the moment I cannot upgrade to 7.4 anytime soon

Many thanks for the support

thumbnail
Olaf Kock, modified 2 Years ago.

RE: RE: Slow response JSP render Liferay 7.2 CE

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

The way JSPs typically work is: They're compiled into a Java Servlet (kind of: turned inside out). That servlet's source code is then compiled to Java bytecode. When the bytecode has an older timestamp than the original JSP, the JSP will be compiled before being used. As filesystem timestamps are notoriously unaware of timezones, we get the timezone confusion possibility.

That being said, I'm not 100% sure how exactly JSP compilation works in the OSGi world, because Liferay does no longer use tomcat's JSP compilation. But it was worth a try.

Does the server have write access to various directories, like tomcat/work, tomcat/temp, osgi/state? Sometimes that goes away when someone accidentally starts the server as root: On next start as unprivileged user, some temporary files/directories are owned by root and not writeable by an unprivileged user.