{ "id": "114333", "key": "TIMOB-13852", "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": "15499", "description": "2013 Sprint 13 API", "name": "2013 Sprint 13 API", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15111", "description": "2013 Sprint 13", "name": "2013 Sprint 13", "archived": true, "released": true, "releaseDate": "2013-07-01" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-06-20T22:29:54.000+0000", "created": "2013-05-14T07:15:42.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ipass1", "supportTeam" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T22:00:44.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Description\r\nIn a quite big tableview with around 500 rows when Scrolling the table slowly, there is no problem at all. But on scrolling the table quickly, the app runs out of memory and it crashes\r\n\r\nh2. Test Code\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n \r\nvar ref_data = new Array();\r\nvar rowView=\"\";\r\nvar row=\"\";\r\nfor (var a=0; a<= 500; a++){\r\n \r\n \r\n row = Ti.UI.createTableViewRow();\r\n row.selectedBackgroundColor = 'yellow';\r\n row.backgroundColor = '#FFffff';\r\n \r\n row.height = 55;\r\n \r\n \r\n ref_data.push(row); \r\n \r\n }\r\n \r\nref_tableView = Titanium.UI.createTableView({\r\n data:ref_data,\r\n height:'auto'\r\n //backgroundColor:'white'\r\n});\r\n \r\nwin1.add(ref_tableView);\r\n \r\nwin1.open();\r\n{code}", "attachment": [ { "id": "39294", "filename": "WP_20130531_001.mp4", "author": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T10:47:33.000+0000", "size": 6590666, "mimeType": "video/mp4" } ], "flagged": false, "summary": "Android: Application runs out of memory when user scroll the table quickly", "creator": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Samsung S3 : 4.1.1", "comment": { "comments": [ { "id": "255141", "author": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\nPlease see the attached video depicting the problem.", "updateAuthor": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T10:47:33.000+0000", "updated": "2013-05-31T10:47:33.000+0000" }, { "id": "258030", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In the test case, when the table is scrolled, new rows are displayed on the screen so new label proxies are created. This means if the table is scrolled to the end, it needs to create 500 label proxies. That's why OOM happens.\r\nWhen the tableview has a large number of rows, the [className|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TableViewRow-property-className] property is recommended to use. If we give the same className to the rows which have the same layout, our platform can reuse those proxies and only reset the content. This will save a lot of memory and make the tableview perform much better.\r\nExample code:\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n \r\nvar ref_data = new Array();\r\nvar rowView=\"\";\r\nvar row=\"\";\r\nfor (var a=0; a<= 500; a++){\r\n \r\n \r\n row = Ti.UI.createTableViewRow({\r\n \tclassName: \"myRow\"\r\n });\r\n row.selectedBackgroundColor = 'yellow';\r\n row.backgroundColor = '#FFffff';\r\n \r\n row.height = 55;\r\n \r\n \r\n ref_data.push(row); \r\n \r\n }\r\n \r\nref_tableView = Titanium.UI.createTableView({\r\n data:ref_data,\r\n height:'auto'\r\n //backgroundColor:'white'\r\n});\r\n \r\nwin1.add(ref_tableView);\r\n \r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-14T22:30:27.000+0000", "updated": "2013-06-17T15:58:08.000+0000" }, { "id": "258850", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Invalid.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T22:29:38.000+0000", "updated": "2013-06-20T22:29:38.000+0000" }, { "id": "414028", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T22:00:44.000+0000", "updated": "2017-03-20T22:00:44.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }