Is the Vaadin session heavy ?

Hi all,

I am starting to create an application with Vaadin.
I was wondering about the size of the session in Vaadin.
Is it possible to check the content of a session in Vaadin ?
Is there any way to improve the memory usage in Vaadin applications ?
Cheers.

              Stefano

Hi,

I’m no expert, but I think you should be able to check the session size and contents using something like
VisualVM
.

About improving the memory usage, basic JVM memory management best practices should apply.

Most of the time, the heavy part in sessions is not the representations of Vaadin components etc. but what your application keeps in the session, including any possible non-lazy Container instances backing tables and other data components, as well as whatever non-Vaadin data you reference (directly or indirectly) from your UI class.

Containers are usually the first place to look if you find you need to optimize memory usage. Especially Bean(Item)Container is quite memory hungry, so if you need lighter-weight alternatives for it, check the add-ons
Maddon
,
MCont
and
GlazedLists Vaadin Container
. For implementing your own containers that perform lazy loading of data from a back-end, see
Lazy Query Container
.