[TIMOB-5651] MobileWeb: Slow render of tableView object
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-08-10T09:29:35.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | MobileWeb |
| Labels | n/a |
| Reporter | Misha Vasko |
| Assignee | Maxim Negadaylov |
| Created | 2011-08-08T07:18:58.000+0000 |
| Updated | 2017-03-09T20:48:10.000+0000 |
Description
Slow render of tableView object. TableView renders very slow if it contains many tableViewRow objects (more 100).
Example: it takes about 16 seconds in Chrome and more than 80 seconds in Fifox to render this tableView.
var w = Ti.UI.currentWindow;
var tv = Ti.UI.createTableView({
top:0,
height:280,
borderWidth:1,
borderColor:"black"
});
var l = Ti.UI.createLabel({
text:"running",
width:"auto",
height:"auto",
bottom:15
});
w.add(tv);
w.add(l);
var count = 500;
var ts = new Date;
var data = [];
for (var c=0;c<count;c++)
{
var row = Ti.UI.createTableViewRow({title:"Row "+(c+1)});
data[c] = row;
}
tv.data = data;
var ts2 = new Date;
var duration = ts2.getTime() - ts.getTime();
var each = duration / count;
l.text = "Executed: "+count+" iterations\nTook: " + duration +" ms\n" + each.toFixed(2) + " ms/row";
Closing ticket as fixed.