{ "id": "176327", "key": "TIMOB-28573", "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": "21265", "description": "", "name": "Release 10.1.1", "archived": false, "released": true, "releaseDate": "2021-11-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-11-03T01:04:49.000+0000", "created": "2021-11-02T23:25:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ListView", "android", "performance", "regression" ], "versions": [ { "id": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-11-17T10:58:55.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\nAs of Titanium 9.3.0, list items added to a {{ListView}} after the window has opened can cause a huge scroll performance issue. This is only noticeable if the list item templates contain a lot of child views, such as 16 or more. This is not an issue if items are added before the window has opened.\r\n\r\n*Note:*\r\nThis is an issue with {{TableView}} as well.\r\n\r\n*Steps to reproduce:*\r\n# Build and run [^ListViewTemplateManyViewsTest.js] on Android.\r\n# Fling the {{ListView}} down.\r\n# Notice how bad the scrolling stutters.\r\n\r\n*Cause:*\r\nAll Titanium proxy objects are assigned the root activity by default, which is the splash screen window.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/kroll/KrollProxy.java#L173\r\n\r\nThe issue with this is that {{ListView}} will notice that the {{ListItem}}'s activity does not match the activity the {{ListView}} is attached to and will *+correctly+* update the {{ListItem}}'s activity and release its old views. This behavior is correct because the item needs to use the same theme as the {{ListView}}, but the item should favor the top-most activity and not the root activity when created.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java#L165-L168\r\n\r\n*Work-Around:*\r\nAdd the items before the window opens, such as during {{ListView}} or {{ListSection}} creation.\r\n", "attachment": [ { "id": "68023", "filename": "ListViewTemplateManyViewsTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-02T23:23:51.000+0000", "size": 1976, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Complex items added to ListView after window open can cause scroll performance issues as of 9.3.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, "comment": { "comments": [ { "id": "459152", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/13163", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-02T23:43:12.000+0000", "updated": "2021-11-02T23:43:12.000+0000" }, { "id": "459172", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Backport PR: https://github.com/appcelerator/titanium_mobile/pull/13183", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-11-17T10:58:55.000+0000", "updated": "2021-11-17T10:58:55.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }