Optimizing Vaadin Portlets in Liferay

What are some thing I can look at (both in LIferay and Vaadin) to optimize performance for my Vaadin built portlets?

I understand that in Vaadin, certain layouts render faster than others. What layout is recommended for performance?

When Vaadin makes an ajax request to the server, do those requests get processed by the various servlets and filters configured in Liferay? For example, the various SSO filters. I think they do. Can we configure it so the ajax requests don’t use the filters?

Does the Vaadin Liferay website use any techniques to optimze its Vaadin based portlets?

Any ideas from the community would be extremely helpful.

There is nothing portlet specific about layouts - same recommendations as for servlets apply. Just remember to make sure the size of the portlet gets set correctly, typically based on the size of the top-level layout.

In general, CssLayout and AbsoluteLayout are fast but not always so easy to use. Avoiding deep hierarchies of VerticalLayout and HorizontalLayout is a good idea when layout performance is an issue. You could also take a look at e.g.
in the directory.

For more information, search for optimization related posts and articles, such as
this one

The servlet spec does not provide a general way for bypassing servlet filters.

For bypassing authentication on Liferay, see e.g.
this thread
. However, note that your application should then take care of all the appropriate security (and possibly also some session management etc.) issues.

I believe the Vaadin portlets on the site (especially the Directory) have had some optimizations such as layout adjustments done, but based on first finding the actual performance issues.

In general, optimizing too early without measuring what is costly usually results in hard to maintain code and often leads to worse performance than what a few small targeted optimizations after measurements would yield. Of course, if the “optimization” does not cost anything in terms of complexity and does not cause other issues, it might be a good idea to apply it right away.

Any comments from others?