Thoughts and Tutorials about Continuous Integration, Application Integration, SOA, IT Architecture, WebSphere and Liferay

Jun 23, 2008

Increase the performance of Liferay

This is my first post considering the portal application Liferay.

How to increase performance:
1. Activate servlet-caching in WebSphere Application Server (see post below)

2. In portal(-ext).properties set

javascript.fast.load=true
theme.css.fast.load=true
velocity.engine.resource.manager.cache.enabled=true

3. Disable JavaScript
If you are using Liferay as an guest user, JavaScript is not nessarly needed.
3.1 Disable Ajax-Portlets
3.1.1 Open WEB-INF/liferay-portlet.xml and and add the tag ajaxable to every portelt entry
<portlet>
<portlet-name>1</portlet-name>
<icon>/html/portlet/mail/icon.png</icon>
<struts-path>mail</struts-path>
<preferences-unique-per-layout>false</preferences-unique-per-layout>
<preferences-owned-by-group>false</preferences-owned-by-group>
<use-default-template>false</use-default-template>
<restore-current-view>false</restore-current-view>
<maximize-edit>true</maximize-edit>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
<render-weight>0</render-weight>
<ajaxable>false</ajaxable>
<header-portlet-javascript>/html/portlet/mail/packed.js</header-portlet-javascript>
<css-class-wrapper>portlet-mail</css-class-wrapper>
</portlet>
3.1.2. Open /html/themes/"your theme"/portal-normal.vm and replace the code line
#js ($js_main_file)

with
#if ( $is_signed_in )

#js ($js_main_file)

#end

3.1.3 Test it .-)

4. Have a look at
http://wiki.liferay.com/index.php/Performance

Using the same JNDI-Name for different applications

Sometimes its nessesary to install the same application twice on one application server cell (or even node).
If this applications are using the same JNDI-Name (like jdbc/LiferayPool) but another Database, you can separate these resource-declarations with the Scope-option in WebSphere.

Problem description:

Assumption:
The Applications are installed on different application servers (JVMs).

1. Go to Resources > JDBC > Data sources
2. Select the application server (JVM) on which for the jdbc-resource corresponding application is installed.


3. Click New to create the JDBC-Resource under this Scope.

4. Repeat this step for the other JDBC-Resource (select the application server of the other application).

Result description




This option is useful for applications like Liferay.