[PR #4516] [MERGED] fix(server): album add/remove asset performance #10405

Closed
opened 2026-02-05 14:21:20 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/4516
Author: @jrasm91
Created: 10/17/2023
Status: Merged
Merged: 10/18/2023
Merged by: @alextran1502

Base: mainHead: fix/album-asset-performance


📝 Commits (1)

  • 0fc7358 fix: album add/remove asset performance

📊 Changes

5 files changed (+97 additions, -58 deletions)

View changed files

📝 server/src/domain/album/album.service.spec.ts (+29 -17)
📝 server/src/domain/album/album.service.ts (+27 -33)
📝 server/src/domain/repositories/album.repository.ts (+14 -3)
📝 server/src/infra/repositories/album.repository.ts (+25 -5)
📝 server/test/repositories/album.repository.mock.ts (+2 -0)

📄 Description

Fixes #3654

Add/remove assets from an album without loading the entire album + assets into memory.

On an album with 2k assets, removal time dropped from 800ms to 200ms. The previous implementation scaled with assets, so longer for bigger albums. It should be constant time now.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/4516 **Author:** [@jrasm91](https://github.com/jrasm91) **Created:** 10/17/2023 **Status:** ✅ Merged **Merged:** 10/18/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix/album-asset-performance` --- ### 📝 Commits (1) - [`0fc7358`](https://github.com/immich-app/immich/commit/0fc7358949d1d3a73f8a34f8ff44676e6a026d49) fix: album add/remove asset performance ### 📊 Changes **5 files changed** (+97 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `server/src/domain/album/album.service.spec.ts` (+29 -17) 📝 `server/src/domain/album/album.service.ts` (+27 -33) 📝 `server/src/domain/repositories/album.repository.ts` (+14 -3) 📝 `server/src/infra/repositories/album.repository.ts` (+25 -5) 📝 `server/test/repositories/album.repository.mock.ts` (+2 -0) </details> ### 📄 Description Fixes #3654 Add/remove assets from an album without loading the entire album + assets into memory. On an album with 2k assets, removal time dropped from 800ms to 200ms. The previous implementation scaled with assets, so longer for bigger albums. It should be constant time now. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:21:20 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10405