1

In vaadin 24 , i am facing one issue related to rendering of page is slow due to Twincolselect.setItems , where i have only 900 records to set . but it was much faster in 23 version .

I tried to set it with asynchronous call ,where page is getting rendered faster but after some time data come in the Twincolselect which is not right. Also checked for Lit Render but it specifically works for Grid and select components . Also, tried to go with Lazy loading where on scroll data get load but TwinccolSelect doesn't have this eventListerner and in few documents it is mentioned that Lazy loading is not supported with Twincolselect.

This is how my code looks like

TwinColSelect<Data> twinCol;

List<Data> data = databaseService.findAll();
data.sort(Comparator.comparing(Data::getName));
this.layout.twinCol.setItems(data); //it is taking too much time to render on page .
  • How many items do you have in the list data? – Simon Martinelli Aug 29 '23 at 06:26
  • The addon can be slow if you have a lot of data since every row is rendered (900 is a lot to render). But the performance between Vaadin 23 and 24 should be about the same. Can you add more details for the implementation? What is the difference of performance between Vaadin 23 and 24? As a workaround you can use this addon (that supports lazy loading): https://vaadin.com/directory/component/twincolgrid-add-on – Jean-Christophe Gueriaud Aug 29 '23 at 07:05
  • As we have 900 Items in the List. But at the implementation side i don't changed anything for TwincolSelect .it just the latest jar with 3.0.0 is being used in vaadin 24 .For the code i have created a layout and added Twincolselect in that and setting the 900 items after fetching the data from the database .Querying the data is not taking time but doing setItems in the TwincolSelect is tedious task .i think TwincolSelect do not support lazy loading as per my knowledge – shweta singh Aug 29 '23 at 07:48
  • Please add some numbers on the time difference between 23&24. V23 takes xy seconds for rendering, v24 takes XX seconds for the same – André Schild Aug 29 '23 at 08:15
  • in Vaadin 23 it is taking 2-3 sec but in vaadin 24 it is taking around 20 sec to load the page with the same item list – shweta singh Aug 29 '23 at 10:09
  • 1
    I would probably create a ticket here: https://github.com/TatuLund/TwinColSelect/issues With a sample code to reproduce the issue. It can be an issue in the addon or in the framework. – Jean-Christophe Gueriaud Aug 29 '23 at 10:14
  • 1
    Please do open the ticket in the issue tracker. It is the better place to follow-up. I did just brief testing of adding 1000 Checkboxes in VerticalLayout and it is faster than TwinColSelect in Vaadin 24. So there is something odd there, but it requires deeper inspection. – Tatu Lund Aug 29 '23 at 13:32
  • 2
    Sure .This is the ticket link for the Reference https://github.com/TatuLund/TwinColSelect/issues/18 – shweta singh Aug 30 '23 at 06:12

0 Answers0