{ "id": "102596", "key": "TIMOB-12637", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-03-25T09:28:55.000+0000", "created": "2012-10-03T17:12:27.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "layout", "performance", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:16:00.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem description*\r\nThere is a lot of unnecessary relayouts when using complex rows with labels and images, leading to poor performance.\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({});\r\nvar table = Ti.UI.createTableView({});\r\nwin.add(table);\r\nwin.addEventListener(\"open\", function() {\r\n\tvar data = [];\r\n\r\n\tfor ( i = 0; i < 10; i++) {\r\n\t\t(function(i) {\r\n\t\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\t\twidth : 320,\r\n\t\t\t\theight : 200\r\n\t\t\t});\r\n\t\t\trow.addEventListener(\"postlayout\", function() {\r\n\t\t\t\tTi.API.info(\"row:\" + i)\r\n\t\t\t});\r\n\r\n\t\t\tvar bimg = Ti.UI.createImageView({\r\n\t\t\t\timage : 'http://overtheair.org/blog/wp-content/uploads/2011/09/appcelerator-logo.png',\r\n\t\t\t\ttop : 25,\r\n\t\t\t\tleft : 0,\r\n\t\t\t\tright : 0,\r\n\t\t\t\tbottom : 5\r\n\t\t\t});\r\n\t\t\tbimg.addEventListener(\"postlayout\", function() {\r\n\t\t\t\tTi.API.info(\"bimg:\" + i)\r\n\t\t\t});\r\n\r\n\t\t\tvar simg = Ti.UI.createImageView({\r\n\t\t\t\timage : 'http://overtheair.org/blog/wp-content/uploads/2011/09/appcelerator-logo.png',\r\n\t\t\t\ttop : 25,\r\n\t\t\t\tleft : 5,\r\n\t\t\t\twidth : 30,\r\n\t\t\t\theight : 30\r\n\t\t\t});\r\n\t\t\tsimg.addEventListener(\"postlayout\", function() {\r\n\t\t\t\tTi.API.info(\"simg:\" + i)\r\n\t\t\t});\r\n\r\n\t\t\tvar bview = Ti.UI.createView({\r\n\t\t\t\ttop : 0,\r\n\t\t\t\tleft : 0,\r\n\t\t\t\twidth : 100,\r\n\t\t\t\theight : 20\r\n\t\t\t});\r\n\t\t\tbview.addEventListener(\"postlayout\", function() {\r\n\t\t\t\tTi.API.info(\"bview:\" + i)\r\n\t\t\t});\r\n\r\n\t\t\tvar label = Ti.UI.createLabel({\r\n\t\t\t\ttext : \"row:\" + i,\r\n\t\t\t\ttop : 5,\r\n\t\t\t\tleft : 5,\r\n\t\t\t\tright : 5,\r\n\t\t\t\tbottom : 5,\r\n\t\t\t\theight : Ti.UI.SIZE\r\n\t\t\t});\r\n\t\t\tlabel.addEventListener(\"postlayout\", function() {\r\n\t\t\t\tTi.API.info(\"label:\" + i)\r\n\t\t\t});\r\n\r\n\t\t\trow.add(bimg);\r\n\t\t\trow.add(simg);\r\n\t\t\tbview.add(label);\r\n\t\t\trow.add(bview);\r\n\r\n\t\t\trow.className = \"testrow\";\r\n\t\t\tdata.push(row);\r\n\t\t})(i);\r\n\t}\r\n\ttable.setData(data);\r\n})\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: TableView poor performance due to relayouts ", "creator": { "name": "pilo", "key": "pilo", "displayName": "erez pilosof", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "pilo", "key": "pilo", "displayName": "erez pilosof", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "iOS 6\r\nTitanium SDK 2+", "comment": { "comments": [ { "id": "243886", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces \r\n\r\nTested with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\niOS iPhone Simulator: iOS SDK version: 6.0\r\n\r\njithinpv\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-25T09:28:55.000+0000", "updated": "2013-03-25T09:28:55.000+0000" }, { "id": "258693", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces\n\nTested with\n\niOS SDK: 5.1\niOS iPhone Simulator: 5.1\nMac OS X Version 10.7.5\nTitanium SDK version 3.1.1.v20130606121419\nTitanium Studio, build: 3.0.1.201212181159\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T07:34:39.000+0000", "updated": "2013-06-20T07:34:39.000+0000" }, { "id": "414557", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:16:00.000+0000", "updated": "2017-03-21T22:16:00.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }