Closed antoinepirlot closed 1 month ago
The app is slow to load now.
Also try to remove lists and use field instead. For example for Destination, give them "setting: Boolean" if it's a setting view instead of having a list to loop
When loading music in playback and playing for the first time, there's a UI freeze on playback view even if there's only one music to load 🤔 since view model.
As the artwork is loaded at the end, I guess there's a lot of recomposition that's making huge performance issues.
In Playlist in Playback, make a simple foreach instead of 3 loops.
Stop using map there and use Collection; Also, in UI use List instead of Map to show all medias as toList() is always called
Optimize how musics are loaded in exo player. The goal is to reduce battery consumption.
[x] on play must not creates new list with a loop. Rework data structure for that and all media must have the same sortedList. Also, you can create new function to load music in playback accepting different type of list -> Correct, when user play from media, it has to keep the same order as he/she sees
[x] Load album artwork only when showing on screen as it takes too much time to load (blocking switch button animation) -> If the album has already an artwork, it should take it from artwork and not getting new one but ask the user with a setting. [later]
[x] Use SnapShot for map to recompose
Reduce RAM consumption by stopping loading and store artworks. only load them when needed and release when not used.