{ "id": "174206", "key": "TIMOB-27434", "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": "20884", "name": "Release 8.2.1", "archived": false, "released": true, "releaseDate": "2019-10-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-10T15:16:41.000+0000", "created": "2019-10-02T02:10:44.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "engSchedule", "regression", "view" ], "versions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "issuelinks": [ { "id": "57853", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "174199", "key": "TIMOB-27431", "fields": { "summary": "Android: Application becomes unresponsive on Long Press ", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "58777", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175602", "key": "TIMOB-28171", "fields": { "summary": "Ti.UI.View Test Suite: Titanium.UI.View Acceptance TIMOB-27434 Android only", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-10-05T08:19:23.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": "*Summary:*\r\nIf you have very deeply nested views (say 15 or more), then anything that causes them to be re-laid out can cause noticeable performance issues as of Titanium 7.5.0.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Android.\r\n# Tap and hold on the text within the {{TextField}}.\r\n# Notice that the app hangs for a couple of seconds.\r\n# Rotate the device to landscape.\r\n# Notice that the app hangs for a couple of seconds.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar rootView = Ti.UI.createView({ width: Ti.UI.FILL, height: Ti.UI.FILL });\r\nvar topView = rootView;\r\nfor (var index = 0; index < 20; index++) {\r\n\tvar nextView = Ti.UI.createView({ width: Ti.UI.FILL, height: Ti.UI.FILL });\r\n\ttopView.add(nextView);\r\n\ttopView = nextView;\r\n}\r\nvar textField = Ti.UI.createTextField({\r\n\tvalue: \"Hello World\",\r\n\twidth: \"80%\",\r\n});\r\ntopView.add(textField);\r\nwindow.add(rootView);\r\nwindow.open();\r\n{code}\r\n\r\n*Cause:*\r\nThis regression was introduced in 7.5.0 when we added the \"extendSafeArea\" and \"safeAreaPadding\" feature. The performance issue is caused by our Java [TiCompositeLayout.onApplyWindowInsets()|https://github.com/appcelerator/titanium_mobile/blob/3b925d3b89e0d59bf89b846bfa127e9656746dbf/android/titanium/src/java/org/appcelerator/titanium/view/TiCompositeLayout.java#L460] method when you have deeply nested views (say 15 or more layers). The dispatched window inset handling appears to get exponentially worse the more views you have nested. Especially since each child view that applies those insets triggers a request-layout.\r\n\r\n*Work-around:*\r\nOnly known work-around is to not nest your views so deeply. Try not to nest more than 10 layers deep.\r\n", "attachment": [], "flagged": false, "summary": "Android: Re-layout of deeply nested views can cause performance issues as of 7.5.0", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1165, "state": "closed", "name": "2019 Sprint 20", "startDate": "2019-09-23T15:38:43.949Z", "endDate": "2019-10-06T15:38:00.000Z", "completeDate": "2019-10-07T18:33:11.953Z", "originBoardId": 114 }, { "id": 1168, "state": "closed", "name": "2019 Sprint 21", "startDate": "2019-10-07T18:35:57.052Z", "endDate": "2019-10-20T18:35:00.000Z", "completeDate": "2019-10-21T15:38:00.182Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "451749", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11253\r\nPR (8.2.x): https://github.com/appcelerator/titanium_mobile/pull/11254\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-02T03:01:57.000+0000", "updated": "2019-10-02T03:01:57.000+0000" }, { "id": "451760", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "We have many candidates for this issue and will try it out immediately, thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-10-02T12:04:07.000+0000", "updated": "2019-10-02T12:04:07.000+0000" }, { "id": "451831", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for jenkins to merge.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-03T18:50:41.000+0000", "updated": "2019-10-03T18:50:41.000+0000" }, { "id": "451899", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master and 8_2_X", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-08T14:24:07.000+0000", "updated": "2019-10-08T14:24:07.000+0000" }, { "id": "451958", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "Fix verified with build: 8.2.1.v20191009074714\r\n\r\nApp no longer hangs upon long press. Ticket closed.", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2019-10-10T15:16:31.000+0000", "updated": "2019-10-10T15:16:31.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }