[AC-199] TiDownloadManager (Android) needs serious code review
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2015-12-22T09:13:39.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android |
Reporter | grebulon |
Assignee | Ingo Muschenetz |
Created | 2015-07-05T09:42:32.000+0000 |
Updated | 2015-12-22T09:13:39.000+0000 |
Description
Let one of your top Java developers take a look at the way _listeners_ is being managed. Mainly the use of _toRemove_ list in _handleFireDownloadMessage_.
Note that _listenerList_ itself is not removed from _listeners_ when it's done.
Also you should consider if the use of _SoftReference_ is wise, specially since you remove the listener after the callback is invoked.
[~buddyguards] thank you for the feedback and insight. Are you interested in contributing a PR with the updates you feel are important, or would you like to review a PR once it is complete?
I just replaced the whole class with UniversalImageLoader :-) Wrote a thin interface that matches TiDownloadManager. It boosted the download performance considerably. But I will gladly review the code when it's submitted.
[~buddyguards] Is it possible for you to provide a sample of the code that you wrote?