{ "id": "169707", "key": "TIMOB-25238", "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": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-10-04T18:06:14.000+0000", "created": "2017-09-06T19:37:48.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "consider-6.2.3" ], "versions": [ { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-10-23T21:37: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "- A view with a border containing another view with a border will re-draw on every frame, causing significant UI performance hit.\r\n\r\n*TEST CASE*\r\n{code:js}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'gray'}),\r\n list = Ti.UI.createListView({\r\n templates: {\r\n template: {\r\n childTemplates: [\r\n {\r\n type: 'Ti.UI.View',\r\n properties: {\r\n left: 5,\r\n right: 5,\r\n top: 5,\r\n backgroundColor: 'blue',\r\n height: 90,\r\n bottom: 5,\r\n borderColor: 'orange',\r\n borderRadius: 10,\r\n borderWidth: 5\r\n },\r\n childTemplates: [\r\n {\r\n type: 'Ti.UI.View',\r\n bindId: 'item',\r\n properties: {\r\n left: 10,\r\n right: 10,\r\n height: 30,\r\n backgroundColor: 'red',\r\n borderColor: 'purple',\r\n borderRadius: 5,\r\n borderWidth: 3\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n defaultItemTemplate: 'template'\r\n }),\r\n section = Ti.UI.createListSection(),\r\n items = [];\r\n\r\nfor (var i = 0; i < 48; i++) {\r\n items.push({\r\n item: {\r\n width: '50%'\r\n }\r\n });\r\n}\r\n\r\nsection.setItems(items);\r\nlist.setSections([section]);\r\n\r\nwin.add(list);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: View with a border can cause a significant performance deficit", "creator": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 948, "state": "closed", "name": "2017 Sprint 19 SDK", "startDate": "2017-09-10T21:24:51.562Z", "endDate": "2017-09-24T21:24:00.000Z", "completeDate": "2017-09-25T17:49:27.460Z", "originBoardId": 114 }, { "id": 951, "state": "closed", "name": "2017 Sprint 20 SDK", "startDate": "2017-09-24T17:50:18.277Z", "endDate": "2017-10-08T17:50:00.000Z", "completeDate": "2017-10-09T20:38:07.840Z", "originBoardId": 114 }, { "id": 944, "state": "closed", "name": "2017 Sprint 18 SDK", "startDate": "2017-08-27T21:13:39.311Z", "endDate": "2017-09-10T21:13:00.000Z", "completeDate": "2017-09-10T21:24:16.435Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "427682", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9410", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-07T14:07:56.000+0000", "updated": "2017-09-07T14:07:56.000+0000" }, { "id": "428384", "author": { "name": "grazianogrespan", "key": "grazianogrespan", "displayName": "grazianogrespan", "active": true, "timeZone": "Europe/Rome" }, "body": "I've done some tests about this bug and reported my findings on Slack channel : \r\nhttps://ti-slack.slack.com/archives/C03CVQX2A/p1506087232000476\r\n\r\nEssentially on Android my TableView with 6.2.2GA is very laggy and with 6.1.2GA it was smooth. So from 6_3_X branch I've rebuilt the sdk with the above PR ( refactored TiBorderWrapperView ) and nothing changed. TableView was still slow when scrolling. The issue was somewhere else so I reverted \"TiUIView.java\" from 6_1_X and rebuilt the sdk with some logs as @Michael Gangolf suggested me. These are the results with `Log.i(\"test\", \"on draw\");` in `protected void onDraw(Canvas canvas)` of TiBorderWrapperView.java:\r\n\r\n1) 6_3_X with refactored TiBorderWrapperView : Logs “on draw” everytime I scroll the tableView.\r\n2) 6_3_X with refactored TiBorderWrapperView and TiUIView from 6_1_X : Logs “on draw” only one time (at the creation).\r\n\r\nIn my case this commit caused the issue: https://github.com/garymathews/titanium_mobile/commit/5bbf07e1d5b63a56fbda810d0cbd1d2262e9f42e#diff-84cbe74b6ace83d16bcb3ecf277594f3\r\n\r\nThere is also another problem with the refactored TiBorderWrapperView :\r\n\r\n{code:java}\r\nvar view = Ti.UI.createView({\r\n width:34,\r\n\theight:34,\r\n\tborderWidth:1,\r\n\tborderRadius:17,\r\n\tborderColor: 'red'\r\n});\r\n{code}\r\n\r\nThis View is filled with red color and should be red only the border.\r\n\r\n", "updateAuthor": { "name": "grazianogrespan", "key": "grazianogrespan", "displayName": "grazianogrespan", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-09-24T13:56:15.000+0000", "updated": "2017-09-24T13:56:15.000+0000" }, { "id": "428530", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~grazianogrespan] I have updated [#9410|https://github.com/appcelerator/titanium_mobile/pull/9410]. I cannot allow HW-acceleration when an alpha channel is used on the background. Android does not render the view correctly.\r\n\r\nDo you have a test case I can use to see the performance deficit you are seeing?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-27T16:31:20.000+0000", "updated": "2017-09-27T16:31:20.000+0000" }, { "id": "428618", "author": { "name": "grazianogrespan", "key": "grazianogrespan", "displayName": "grazianogrespan", "active": true, "timeZone": "Europe/Rome" }, "body": "@Gary Mathews Unfortunately I don't have a test case but instead I have a great news : I've just built the sdk with your latest commit [ #9410|https://github.com/appcelerator/titanium_mobile/pull/9410/files] (TiUIView+TiBorderWrapperView) and the app returned to be smooth and fast. I suppose this [line|https://github.com/garymathews/titanium_mobile/blob/6e41e94646c89db6ca1f29348a1692a13a2d15a6/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L1442] was the problem.. Now everything is perfect (y) Thanks!", "updateAuthor": { "name": "grazianogrespan", "key": "grazianogrespan", "displayName": "grazianogrespan", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-09-30T17:33:48.000+0000", "updated": "2017-09-30T17:33:48.000+0000" }, { "id": "428648", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed & PR merged for master.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-02T22:19:58.000+0000", "updated": "2017-10-02T22:19:58.000+0000" }, { "id": "428649", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary]\r\n6_3_X: https://github.com/appcelerator/titanium_mobile/pull/9501", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-02T22:26:53.000+0000", "updated": "2017-10-02T22:26:53.000+0000" }, { "id": "428653", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed & PR merged for 6.3.0 PR.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-02T22:57:08.000+0000", "updated": "2017-10-02T22:57:08.000+0000" }, { "id": "429464", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.0.0.v20171023120246 & 6.3.0.v20171018084007.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.10.0.201709271713\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.10-2\r\nAppc CLI: 6.3.0-master.15\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.6\r\nNode Ver: 7.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 — Android 6.0.1\r\n⇨ google Pixel — Android 7.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-23T21:36:50.000+0000", "updated": "2017-10-23T21:36:50.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }