eclipsesource / eclipsesource/tabris-js
Slower performances of collectionView with a lot of columnCount
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
When the collectionView has a high number of columns a significant slowdown in performance is felt during scrolling.
The problem does not come from the number of items inserted at once but from the number of columns displayed.
Applications such as WHatsapp, Telegram etc... do not have this problem.
### Expected behavior
fast scrolling of the elements of the collectionView
### Environment
- Tabris.js version: 3.3
- Device: Huawei P10 Lite
- OS: Android 8
### Code snippet
```javascript
const{CollectionView, TextView, contentView} = require("tabris");
// emojisList is an array with 2000 emojis characters
new CollectionView({ top: 45, left: 0, right: 0, bottom: 0, itemCount:emojisList.length, columnCount: 8, cellHeight: 40,
createCell: () => {
const cell = new Composite({ width:40, height:40, class:'cell'});
new TextView({centerX:0, centerY:0, id:"emoji"}).appendTo(cell);
cell.onTap(()=>{
});
return cell;
},updateCell: (cell,index) =>{
cell.find('#emoji').only().text = emojisList[index].emoji;
}
}).appendTo(.contentView);
```
Contributor guide
Research direction
Start with the provided CollectionView reproduction using 2,000 emojis, eight columns, and Android 8 on the Huawei P10 Lite. Investigate scrolling behavior as columnCount increases, then compare the result with the expected fast scrolling; no project file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100