Closed GrazianoCapelli closed 7 years ago
Enhancement implemented in commit 323c7a4.
I decided to reopen the issue and revert to the previous solution, because the new one was too memory hungry. I prefer to keep the application as light as possible (now we allocate less than 16 MB of memory, including EGM grid). Thus I need more work. Maybe a branch will be opened.
Thumbs are now asynchronously loaded in a SparseArray on start. The memory usage is now reasonably low and no reload is done when activities are restarted.
Currently the thumbnail of each tracks is loaded on-the-fly by a tracklist card when needed, causing:
It would be fine to keep in memory the thumbnail of every track of the tracklist.
I tried including Picasso library with a good result (I left commented out the few lines of code I've added to try it). But the use of Picasso for very little and static images isn't an optimized solution. It would be better to include the thumb Bitmap directly into each Track object, maybe including a synchronous and an asynchronous setter, and a getter (for the cards).
Thus, I think we could implement a way to enable these features: 1) The app can tell to a track to Async load a thumbnail (on start, or when the thumb is ready); 2) The tracklist can request a thumbnail, causing a (urgent) synchronous load of the thumb if not yet loaded.