tlaukkan / vaadin-lazyquerycontainer

Lazy Query Container is a lazy loading container implementation for accessing data from business services.
http://vaadin.com/directory#addon/117
39 stars 73 forks source link

LazyQueryView performs unnecessary loads #67

Closed wdefik closed 9 years ago

wdefik commented 9 years ago

Hello, Tommi. I have an issue with LazyQueryView when i use LazyQueryContainer. I use com.vaadin.ui.Table class, When i scroll my table to the (for example) 3rd page (pageLength is 25) and then execute table.refreshRowCache() (for example user want to refresh the table and there may be some changes in DB since the last fetch) Vaadin's table is trying to load records 0-65 and it calls Container.getItemIds(int startIndex, int numberOfItems). But unfortunatelly LazyQueryContainer loads these records with paging and performs 3 queries to DB which causes to load the table very slowly (my table contains over 10 000 000 records). I think it would be great if it loads all rows together and execute the query just one time.

Thank you for your job, it is very useful for me. Best Regards, Alex.

tlaukkan commented 9 years ago

Please change the batch size to be at least double your page size. If you need further optimization I would be happy to look at suggested code change in form of pull request.