MGaetan89 / ShowsRage

Android application to manage your Medusa/SickRage installation
https://MGaetan89.github.io/ShowsRage/
Apache License 2.0
52 stars 11 forks source link

Lag when loading a large list of tv shows #138

Closed 6cUbi57z closed 6 years ago

6cUbi57z commented 7 years ago

Bug report

Issue description

I am experiencing lag when first opening the app and sometimes when scrolling through the TV list.

I have some experience with Android development (although have not looked through the code) and I believe the issue is caused by the list item renderer. When the app first opens, the list items are very small as they do not yet have a banner image and so lots of the items are displayed on the screen. This causes the app to request the banner image for every visible item in the show list which causes the lag.

Expected result

If the list item view were to have a fixed height or a placeholder image while the banner loads, there would not be as many list items initially visible in the list and not as many request would be made. This should reduce the lag (not to mention that the placeholder would be asthetically pleasing :) )

Steps to reproduce

  1. Configure a sickrage instance with a large number of shows (e.g. 100). A slower machine may be best (i.e. a raspberry pi).
  2. From a tablet or large screen/high dpi device, connect showrage to the sickrage instance
  3. When the show list is loading, perform some UI interaction (i.e. opening the menu drawer, scrolling)
  4. Bonus: Scrolling the TV list fast can sometimes also lag
MGaetan89 commented 7 years ago

Thanks for the detailed report. I also noticed this issue when using the poster layout. Your solution will definitely help improve the start time. From my investigation, the loading of the show stats also slows down the display of the list of shows. I will improve this point in the next version of ShowsRage.

MGaetan89 commented 6 years ago

I have implemented this. It will be part of the next version (1.6).