Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5651] MobileWeb: Slow render of tableView object

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-08-10T09:29:35.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsn/a
ReporterMisha Vasko
AssigneeMaxim Negadaylov
Created2011-08-08T07:18:58.000+0000
Updated2017-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";

Comments

  1. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source