tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

Improve CollectionView performance

Open tbuschto opened this issue 6 years ago • 3 comments

Performance for initial loading and when scrolling can be bad depending on the number of cells and widgets in the cell, especially on iOS.

See also https://github.com/eclipsesource/tabris-js/issues/1581#issuecomment-397772032

tbuschto avatar Nov 26 '18 14:11 tbuschto

The performance is also relevant on Android when creating the initial set of cells. When starting to scroll and creating more cells can lead to noticeable on Android. Can be observed in the tabris-js-app.

mpost avatar Jun 03 '19 13:06 mpost

Possibly improvement could be to refine the protocol. eg.

cellType: {
    type: 'any', // string|function,
    default: null,
    set(name, value) {
      if (value !== this.cellType) {
        this._storeProperty(name, value);
        this._nativeSet(
          'cellType',
          value instanceof Function
            ? index => encodeCellType(value(index))
            : value
        );
        this._needsReload = true;
      }
    }
  },
  cellHeight: {
    type: 'any', // natural|auto|function
    default: 'auto',
    set(name, value) {
      if (value !== this.cellHeight) {
        this._storeProperty(name, value);
        this._nativeSet(
          'cellHeight',
          value instanceof Function
            ? (index, type) => encodeCellHeight(value(index, type))
            : value
        );
        this._needsReload = true;
      }
    }
  },

mpost avatar Jun 05 '19 08:06 mpost

Also related: https://github.com/eclipsesource/tabris-js/issues/511

mpost avatar May 22 '20 09:05 mpost