Introduction #

The aim of this article is to collect performance enhancing tweaks, tips and techniques. Please contribute your own techniques for enhancing performance.

Startup #

 ##Lucene Search
 #Set the following to true if you want to index your entire library of files on startup.

General performance #;

 # The layout cache filter will cache pages to speed up page rendering for
 # guest users. See ehcache.xml to modify the cache expiration time to live.

Disable unneeded filters

## Servlet Filters

    # The audit filter populates the AuditRequestThreadLocal with the
    # appropriate request values to generate audit requests.

and many more 

Minimize output #

Compression Filter #

There is a known optimilisation for LR 5.0+ Compression Filter

		<filter-name>Cache Filter - Resource CSS JSP</filter-name>


Saves some 50Kb on every page but portlet look-feel modification is not possible for all (including (Omni)Admin)

 ## Portlet CSS Portlet
 # Set this to true to enable the ability to modify portlet CSS at runtime
 # via the Look and Feel icon. Disabling it can speed up performance.
# Set this to false if the system does not use allow users to modify the
# look and feel.

Javascript #

Not needed scripts could be expunged here. But the fattest of them all jQuery is needed almost always

 ## JavaScript
 # Set a list of JavaScript files that will be loaded programmatically in
 # /html/common/themes/top_js.jsp.
 # The ordering of the JavaScript files is important. Specifically, all
 # JQuery scripts should go first.
 # The Liferay scripts are grouped in such a way, that the first grouping
 # denotes utility scripts that are used by the second and third groups. The
 # second grouping denotes utility classes that rely on the first group, but
 # does not rely on the second or third group. The third grouping denotes
 # modules that rely on the first and second group.
 javascript.files= .....

Setting this will improve download time, but tweaks above are probably unused

 ## JavaScript
 # Set this property to true to load the combined JavaScript files from the
 # property "javascript.files" into one compacted file for faster loading for
 # production. Set this property to false for easier debugging for
 # development. You can also disable fast loading by setting the URL
 # parameter "js_fast_load" to "0".


 ## Theme
 # Set this property to true to load the theme's merged CSS files for faster
 # loading for production. Set this property to false for easier debugging
 # for development. You can also disable fast loading by setting the URL
 # parameter "css_fast_load" to "0".

Resources #

Get your images and other resources from your personalised theme or even an HTTP server alias like Resources uploaded in Liferay are being served-up from database and will always be slower than using this strategy. especialy for recurring enterprise logo's and all.

Themes #

If you need a high performing landing-page and other pages you could consider creating a special theme for these pages.

Velocity Caching #

    # Set this to true in production so that VM templates are cached


Hack removing ALL CSS

edit templates\portal_normal.vm;

 #if ( $is_signed_in ) 
  #css ($css_main_file)  

Javascript #

Hack removing ALL scripts en catching script exceptions LR 4.3.4

edit templates\portal_normal.vm;

  <title>$company_name - $the_title</title>
 #if ( $is_signed_in && ($permissionChecker.isOmniadmin() )  )
  <script type="text/javascript">
    // hack catching exceptions
    Liferay = function() {return {};}();
    Liferay.Portlet = {
     isAjax: function(id) {return true;},
     process: function(id) {}
    Liferay.Session = {init: function(params) {}};
 #css ($css_main_file)  
 #if ( $is_signed_in && ($permissionChecker.isOmniadmin() )  )
   #js ($js_main_file)

only use $is_signed_in for all signed in users/admin's


Database #

##These settings have been found to increase database connection performance
jdbc.default.preferredTestQuery=SELECT releaseId FROM Release_

##The Tomcat Thread pool has been found to be faster than 3CP0 or DBCP


Links to useful references:

General SQL: clustering databases


Sequoia is a transparent middleware solution offering clustering, load balancing and failover services for any database. Sequoia is the continuation of the C-JDBC project. The database is distributed and replicated among several nodes and Sequoia balances the queries among these nodes. Sequoia handles node and network failures with transparent failover. It also provides support for hot recovery, online maintenance operations and online upgrades.

Browser #


If you're serving content using SSL, open the URL


Locate the value:


Double-click to set value to true

Without this setting, each and every page load will reload all the images and CSS, making pages load about 5 times slower.

Application Server #


   Enable Servlet Caching & Dynamic Caching.

Dynamic Caching:

Servlet Caching:

Optional: Create a cachespec.xml to cache dynamic content: (Without a cachespec.xml only static content is cached, but are there any dynamic jsps with a constant static output?)

But be careful, these settings need a powerful Application Server.

Improvement: Approxamately 50% faster

Probably this works also with other Application Servers like Tomcat...

Untergeordnete Seiten

0 Anhänge
109684 Angesehen
Durchschnitt (2 Stimmen)
Die durchschnittliche Bewertung ist 3.0 von max. 5 Sternen.
Antworten im Thread Autor Datum
where to to put those properties... Mithun Salinda 28. Januar 2014 00:35
Hi These will go in file.... Himanshu Bhandari 1. Juli 2015 04:15
Other important way of improvement is reduce... Fou crazy 15. Juli 2015 00:43

where to to put those properties
Gepostet am 28.01.14 00:35.
These will go in file.
Gepostet am 01.07.15 04:15 als Antwort auf Mithun Salinda.
Other important way of improvement is reduce the size of the images used. When a new user arrive to the portal needs to download all the resources of the web and if we use big images the load time will be too high.
To solve this problem you must use images optimized in your themes. And if you have images contributed you can use 'Image Optimizer' from the marketplace, is an easy app recently published to compress images contributed on the portal.
Gepostet am 15.07.15 00:43.