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

Slow /api/albums endpoint #12570

Open
2 of 3 tasks
C-Otto opened this issue Sep 11, 2024 · 4 comments
Open
2 of 3 tasks

Slow /api/albums endpoint #12570

C-Otto opened this issue Sep 11, 2024 · 4 comments

Comments

@C-Otto
Copy link
Contributor

C-Otto commented Sep 11, 2024

The bug

When the /api/albums endpoint is queried, for example when going to the albums page or trying to add assets to an album, this takes a lot of time. I'd like the response to be quicker, possibly with some details loaded in separate requests.

In my case, with a server I consider fast, with lots of dedicated RAM and fast SSDs for the database, the endpoint takes 903ms to load. I currently have 225 albums.

Related to #11071

The OS that Immich Server is running on

Debian Stable

Version of Immich Server

v1.114.0

Platform with the issue

  • Server
  • Web
  • Mobile
@mmomjian
Copy link
Contributor

Seems to be a duplicate of #11071 as you mentioned, what makes this a new issue?

@C-Otto
Copy link
Contributor Author

C-Otto commented Sep 11, 2024

It's not the browser that struggles, but the server. The issue is unrelated to the loading of thumbnails, as the endpoint only returns URLs. Switching to/from the list mode on the albums page is almost instant in my browser.

@mmomjian
Copy link
Contributor

mmomjian commented Sep 11, 2024

How many albums do you have? Edit: I see 225. 900ms doesn’t seem crazy unreasonable enough to be a bug to me, but I’ll give it a bit for someone else to chime in.

@mertalev
Copy link
Contributor

I'd imagine that fetching albums for the albums page should be at least an order of magnitude faster than that, possibly closer to two. There are a lot of queries that are just slow and unoptimized. While porting things over to the Kysely query builder, I've also been doing an optimization pass on these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants