I’m totally new to Vaadin and I’ve been looking by myself for a while for a realistic example of web session bloat when using Vaadin, but it seems that the framework design makes it quite hard to do something stupid. Does anyone know a typical anti-pattern example of web session memory abuse in a Vaadin application?
This should cause some issues if you have lots of users :
List<BookEntity> list = service.loadAllMillionEntitiesFromDB();
BeanItemContainer inMemoryContainer = new BeanItemContainer(list);
myTable.setContainerDataSource(inMemoryContainer;
If you you sane amount of data in visible components or use lazy loading containers, you should do fine.
A typical case where memory leaks occur: create your own static event router and register your views to it. If you don’t deregister or use weak references, that will cause the entire session to remain in memory after the session should close.