{ "id": "110008", "key": "TIMOB-12816", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15273", "description": "2013 Sprint 05 API", "name": "2013 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2013-03-11" }, { "id": "14815", "description": "2013 Sprint 05", "name": "2013 Sprint 05", "archived": true, "released": true, "releaseDate": "2013-03-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-14T00:10:23.000+0000", "created": "2013-02-21T23:48:06.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "25989", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "102764", "key": "TIMOB-11282", "fields": { "summary": "Android TableView with remote images is very slow", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T21:00:21.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": "Since we did many image operations in UI thread, for example creating the drawable reference from file or URL and resizing the image after it's loaded, the Table View with remote images was very slow (TIMOB-11282). To fix that, we moved some of those operations to non-UI threads and tried to run them in parallel using multiple threads. But this [fix|https://github.com/appcelerator/titanium_mobile/pull/3395] introduces several other issues: (see the comments in TIMOB-11282 for more info)\r\n1. The RejectedExecutionException can happen when workqueue in the ThreadPoolExecutor is full and the Executor cannot accept more tasks.\r\n2. Even when the image is in the cache, it is not fetched/used correctly.\r\n3. Since rows with the same className are reused, when the table is scrolled, rows will first render the old images, then update with the correct content.\r\nNeed to clean up the code in the image view and fix the above issues.", "attachment": [], "flagged": false, "summary": "Android: Clean up the Image View", "creator": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "239393", "author": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "body": "I can confirm that this was not properly fixed. Not only that it makes the table view completely useless and MUCH slower than 3.0.0 GA. Cannot use this build.", "updateAuthor": { "name": "dhaligas", "key": "dhaligas", "displayName": "Darren Haligas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-22T15:58:12.000+0000", "updated": "2013-02-22T15:58:12.000+0000" }, { "id": "240838", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/3936\r\nIn this PR,\r\n1. Use TiDownloadManager which uses an unbounded pool to cache the remote images in the SD card instead of AsyncTask because AsyncTask uses a bounded pool and it may cause RejectedExecutionException.\r\n2. Implement TiLoadImageManager which uses an unbounded pool to fetch and decode bitmaps.\r\n3. Use both memory cache and disk cache.\r\n4. Don't pre-scale the images in our code. Let native Android take care of scaling.\r\n5. Download and decode bitmaps in the background thread so it won't block the UI.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-06T00:01:38.000+0000", "updated": "2013-03-10T06:28:19.000+0000" }, { "id": "413011", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T21:00:21.000+0000", "updated": "2017-03-16T21:00:21.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }