Table with layouts in cells take a long time

Hi,

I have a table with one column , each cell contains a layout that contains a button and a some labels… …
If the rows number is small is working fine, but if the number rows is big (more than 100) take a long time and if is biggest the explorer going to be unstable (is not necessary to display all rows at once.)

I 'm trying to resolve doing something like this : (I have readed in other post)



		table=new Table();
		table.setPageLength(0);
		table.setHeight("300px");

But do no work :

how I can fix this? Could i resolve with other way?

Thanks!

Solved with PageTable addon.

What layout were you using? Vertical/Horizontal/GridLayouts are quite expensive calculation wise, and using a CssLayout usually helps when rendering layouts inside a Table. Other layouts from the Directory might also be faster, such as
WeeLayout
or
DashLayout
.

Also, setting the pageLength is not the usual first option to optimize, but instead the cache rate of the table (number or pages rendered below and above visible rows):

table.setCacheRate(0)

I’m testing what is the best way to do this:

I’m using a VerticalLayout and HorizontalLayout inside of the VerticalLayout.
11525.png

In that case it is no wonder the rendering takes a long time. Nesting layouts inside each other will further slow it down.

From what I can see in the picture, you’d be fine just using the following structure inside each row:

CssLayout
    Label (XHTML mode, for colors and linebreaks)
    RatingStars

That would be much faster to render. And do remember to set all of the components to undefined size, that will further improve the rendering time.

EDIT: of course, some of the text in there are probably links, so you might need to embed a couple A tags inside there as well.