Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: Slow loading times on Homescreen with big Jellyfin libraries #60

Open
5 tasks
sevenrats opened this issue Mar 20, 2024 · 4 comments
Open
5 tasks
Labels
bug Something isn't working

Comments

@sevenrats
Copy link
Collaborator

sevenrats commented Mar 20, 2024

Please describe your bug

the app takes about 14 seconds to request 5 empty skeletons before it starts requesting images. why is this happening and what is the solution?

Jellyflix Version

Other

if other:

develop

Jellyfin Version

10.8.13

if other:

No response

Environment

- OS:debian
- OS Version:trixie
- Playback Method:na

We could possibly take the following steps to reduce loading times:

  • Prevent Skeletons to load images from placeholder urls
  • Use ListView to lazy load the widgets
  • Cache the Header response
  • Cache the Top 10 response (and the ranking data persistently)
  • Limit image sizes
@sevenrats sevenrats added the bug Something isn't working label Mar 20, 2024
@sevenrats
Copy link
Collaborator Author

observed this on linux, android, and web so far.

@jdk-21 jdk-21 changed the title [Issue]: about 14 seconds before app starts to do anything [Issue]: Slow loading times on Homescreen with big Jellyfin libraries Mar 20, 2024
@jdk-21
Copy link
Collaborator

jdk-21 commented Mar 20, 2024

We could possibly take the following steps to reduce loading times:

  • Prevent Skeletons to load images from placeholder urls
  • Use ListView to lazy load the widgets
  • Cache the Header response
  • Cache the Top 10 response (and the ranking data persistently)
  • Limit image sizes

@TimGels
Copy link

TimGels commented Mar 22, 2024

That Top 10 should definitely be cached. I quickly checked the relevant logic of it in the code. It is a very expensive operation to run every time you open the home page (I assume it is executed every time that loads). Perhaps make it run in the background once in a while to update the cache list of 10 entries.

@sevenrats sevenrats mentioned this issue Mar 24, 2024
2 tasks
@sevenrats
Copy link
Collaborator Author

after tooling timers into the code it was clear to me that several of these widgets, namely the topten and the genre banner, were associated with load times in excess of 30 seconds. I just pulled these in the above PR, which solves this issue tidily.

@jdk-21 jdk-21 closed this as completed May 20, 2024
@jdk-21 jdk-21 reopened this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants