{ "id": "81119", "key": "AC-2794", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-10-20T11:59:04.000+0000", "created": "2011-10-04T21:58:23.000+0000", "labels": [ "performance", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updated": "2016-03-08T07:47:42.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I've run into serious performance issues with the TableView, when its rows become a bit more complex, containing a few positioned labels. Scrolling is extremely laggy -- especially the first time a row comes in to view. While I understand that a great deal of fine tuning and care must go in to a table to ensure it performs well, basic table scroll performance is still way, way below other native apps, such as Ebay or Facebook. This is a serious issue for our company. I'm including source that is reproducible on an iPhone device. \r\n\r\nThis performance issue can also be plainly seen in the app GetGlue. Scrolling a long list of rows is extremely jerky and laggy compared to any other similar native iPhoen app, giving the Titanium app a non-native feel. It appears to be some kind of caching issue, because once rows come in to view the table is considerably more responsive.\r\n\r\nI'm using SDK 1.7.3 and Xcode 3.2.6, and testing on an iPhone 3 and iPhone 4.\r\n\r\nExample code below. Performance can only be detected on an iPhone device, and is especially apparent the first time the app is opened and the table is scrolled.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ \r\n title:'Test',\r\n});\r\n \r\nvar tableView = Ti.UI.createTableView({\r\n minRowHeight: 75\r\n});\r\nwin.add(tableView);\r\n \r\nvar rows = [];\r\nfor (var i = 0; i < 35; i++) {\r\n rows.push(createRow());\r\n}\r\n \r\nfunction createRow() {\r\n var row = Ti.UI.createTableViewRow({\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0,\r\n className: 'className',\r\n layout: 'horizontal'\r\n });\r\n \r\n // Main left container.\r\n var leftView = Ti.UI.createView({\r\n left: 10,\r\n top: 10,\r\n bottom: 0,\r\n width: 220\r\n });\r\n row.add(leftView);\r\n \r\n leftView.add(Ti.UI.createView({\r\n top: 0,\r\n left: 0,\r\n height: 16,\r\n width: 16,\r\n backgroundImage: 'images/test.png'\r\n }));\r\n \r\n leftView.add(Ti.UI.createLabel({\r\n text: 'Big font, longer text',\r\n top: 0,\r\n height: 20,\r\n width: 'auto',\r\n left: 25,\r\n font: {fontSize: 16, fontWeight: 'bold'}\r\n }));\r\n \r\n leftView.add(Ti.UI.createLabel({\r\n text: 'Small 1',\r\n top: 25,\r\n left: 25,\r\n height: 15,\r\n font: {fontSize: 12, fontWeight: 'bold'}\r\n }));\r\n \r\n leftView.add(Ti.UI.createLabel({\r\n text: 'Small 2',\r\n top: 40,\r\n left: 25,\r\n height: 15,\r\n font: {fontSize: 12}\r\n }));\r\n \r\n leftView.add(Ti.UI.createLabel({\r\n text: 'Small 3',\r\n top: 25,\r\n right: 0,\r\n height: 15,\r\n font: {fontSize: 12, fontWeight: 'bold'},\r\n width: 'auto'\r\n }));\r\n \r\n leftView.add(Ti.UI.createLabel({\r\n text: 'Small 4',\r\n top: 40,\r\n right: 0,\r\n height: 15,\r\n font: {fontSize: 12},\r\n width: 'auto'\r\n }));\r\n \r\n var rightView = Ti.UI.createView({\r\n left: 20,\r\n top: 10,\r\n bottom: 0,\r\n width: 'auto'\r\n });\r\n row.add(rightView);\r\n \r\n rightView.add(Ti.UI.createLabel({\r\n text: 'Small 4',\r\n top: 0,\r\n height: 20,\r\n width: 'auto',\r\n font: {fontSize: 13, fontWeight: 'bold'},\r\n textAlign: 'right'\r\n }));\r\n \r\n rightView.add(Ti.UI.createLabel({\r\n text: 'BIG',\r\n top: 20,\r\n height: 30,\r\n width: 'auto',\r\n font: {fontSize: 30, fontWeight: 'bold'}\r\n }));\r\n \r\n return row;\r\n}\r\n \r\ntableView.setData(rows);\r\n \r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Serious performance issue with tableviews that contain multiple labels.", "creator": { "name": "judeosborn", "key": "judeosborn", "displayName": "Jude Osborn", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "judeosborn", "key": "judeosborn", "displayName": "Jude Osborn", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "169873", "author": { "name": "adecena", "key": "adecena", "displayName": "Anthony Decena", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "adecena", "key": "adecena", "displayName": "Anthony Decena", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T11:54:15.000+0000", "updated": "2011-10-20T11:54:15.000+0000" }, { "id": "177259", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Closing resolved tickets due to inactivity.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-27T07:33:09.000+0000", "updated": "2011-12-27T07:33:09.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }