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

perf(server): use queries to refresh library assets #7685

Merged
merged 6 commits into from Mar 7, 2024

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Mar 7, 2024

Description

The current implementation fetches all assets for a library, which is slow and uses a substantial amount of memory. This PR moves this logic to optimized queries instead.

Fixes #7373

Copy link

cloudflare-pages bot commented Mar 7, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 361eac1
Status: ✅  Deploy successful!
Preview URL: https://48085978.immich.pages.dev
Branch Preview URL: https://perf-library-asset-refresh.immich.pages.dev

View logs

@mertalev mertalev requested a review from etnoy March 7, 2024 01:30
Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alextran1502 alextran1502 merged commit 1ec5d61 into main Mar 7, 2024
26 checks passed
@alextran1502 alextran1502 deleted the perf/library-asset-refresh branch March 7, 2024 03:23
aviv926 pushed a commit to aviv926/immich that referenced this pull request Mar 7, 2024
* use queries instead of js

* missing await

* add mock methods

* fix test

* update sql

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

Successfully merging this pull request may close these issues.

Out of memory when scanning libraries with >1M assets
3 participants