GeneratedColumn significantly degrades performance of a Table


I have a Table with 9 columns and 30 visible rows, pageLength is set to 30 and cacheRate to 1.

Initial load shows:

Processing time was 152ms for 6769 characters of JSON

and additional scrolling shows:

Processing time was 145ms for 9737 characters of JSON

After addition of a simple GeneratedColumn, performance degrades significantly. Initial load shows:

Processing time was 241ms for 8253 characters of JSON

and additional scrolling shows:

Processing time was 589ms for 14295 characters of JSON (4x slower that without GeneratedColumn)

ColumnGenerator looks like:

ColumnGenerator inverterGenerator = new ColumnGenerator() {
  public Component generateCell(Table source, Object itemId, Object columnId) {
    return new Label("TTT");

Settings cacheRate to 0.1 “solves” the problem while annoying user with loading delays with every scroll. Is there any other way besides GeneratedColumn of adding a simple text column to a Table? Or maybe GeneratedColumn can be tweaked somehow?

Best regards,
Pavel Arnost


When creating content via GeneratedColumn you are adding components to the Table instead of raw text. You might get some improvement by setting the width of the Label to undefined (default is 100% which needs some extra size calculations on the client side).

The best solution might be that the ColumnGenerator could also return plain String to be rendered in the same way as other text content in the table. Would you to fill a ticket about this to ?



thanks for advice, setSizeUndefined helped a lot.

I created new ticket here: