jellyfin / jellyfin-meta

A repository to hold our roadmap, policies, and more.
25 stars 4 forks source link

Too many GetUserById calls #73

Closed goremykin closed 5 months ago

goremykin commented 5 months ago

I have noticed that userManager.GetUserById is called dozens of times when I open the home screen. So I decided to measure how much time it takes in total and how often is it called when I open the home screen. It is called 66 times and it takes 3 seconds in total just to show the home screen.

I think these numbers are quite big and we should discuss how to reduce them. Maybe some context where we store a current user can be a starting point for this discussion?

crobibero commented 5 months ago

Sounds like you are referring to the server code. The call you are looking at is cached and wouldn't be the part that delaying the home screen render.

goremykin commented 5 months ago

@crobibero, Ah, I see. Once the dashboard is loaded, these calls take a little time - probably due to the caching you mentioned. Thanks!