Cache first page of an application for all users to make it quicker


I’m using Vaadin as portlet application in Liferay.
Loading the application and the displaying the first view for each user can be slow (more than 2 seconds in order to show a form).

The first page of my form is always the same, I don’t customize this view on user specific data. So, i would like to deal it as if it were a static page cached the first time it’s loaded… or another solution that can make the page loading faster.

Is there tips or functionalities that make it possible ?

My bosses are showing me other companies quick PHP forms and it would be very hard for me to go back to PHP :(.

No - Vaadin views are not like static web pages and cannot be cached as is.

I guess the first step would be to find out what is slow - is it the loading of the widgetset XML file (the big part of it can be cached and usually is), the server-side processing of the first request(s) or the rendering of the form.

Add “?debug” to your URL to see the duration of the server side request and the rendering time. The next steps would depend on what is the slow part - do you need to reduce the initialization overhead on the server or optimize the layouts for rendering speed or something else.

Hi Henri,

Thanks for your answer.
First of all, i’m going to activate the gzip mode on my apache server. For example, the widgetset size is going to decrease (from 700 k to 150k).

Then i’ll have a look to ?debug mode

There is also a lot of other optimization techinques for liferay and vaadin like