I don't recall if this has always been a problem, I suspect it has but maybe I haven't noticed in the past, since I don't use the web UI often.
Upon loading the home page on the web interface, all widgets load on my dataset within a second or two, however the Next Up widget takes 15-20 seconds to load. During this time, the loading spinner remains overlaid on the display, which is an irritation.
As a quick and dirty test I added the following index on the library DB:
CREATE INDEX idx_test_UserDataLastPlayed on UserDatas (key, userId, lastPlayedDate);
With this index, query times dropped to about 600ms, a pretty drastic improvement. I'm not familiar enough with C# or this project to contribute a fix for this, but this seems like a pretty easy win.
Reproduction Steps
With a moderately sized library, load the home page of the web interface
Note response time is very long for Next Up HTTP request.
[2024-04-08 18:04:36.432 +10:00] [WRN] Slow HTTP Response from "https://<hostname>/Shows/NextUp?Limit=24&Fields=PrimaryImageAspectRatio%2CDateCreated%2CBasicSyncInfo%2CPath%2CMediaSourceCount&UserId=<userid>&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb&EnableTotalRecordCount=false&DisableFirstEpisode=false&NextUpDateCutoff=2023-04-09T08%3A04%3A15.879Z&EnableRewatching=false" to "<client-ip>" in 0:00:20.5455497 with Status Code 200
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Please describe your bug
I don't recall if this has always been a problem, I suspect it has but maybe I haven't noticed in the past, since I don't use the web UI often.
Upon loading the home page on the web interface, all widgets load on my dataset within a second or two, however the Next Up widget takes 15-20 seconds to load. During this time, the loading spinner remains overlaid on the display, which is an irritation.
As a quick and dirty test I added the following index on the library DB:
With this index, query times dropped to about 600ms, a pretty drastic improvement. I'm not familiar enough with C# or this project to contribute a fix for this, but this seems like a pretty easy win.
Reproduction Steps
Jellyfin Version
10.8.13
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct