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

feat(cli): concurrent upload #7192

Merged
merged 15 commits into from Feb 20, 2024
Merged

feat(cli): concurrent upload #7192

merged 15 commits into from Feb 20, 2024

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Feb 19, 2024

Description

When doing bulk uploads, I noticed that uploading through web was much faster than through the CLI (specifically when the upload component is minimized to avoid rendering slowdown). The former is able to upload files concurrently, while the latter currently does everything sequentially.

This PR addresses this limitation by refactoring the upload command to be "batch"-oriented - it runs a given number of promises at a time, finishing one step for all files before moving to the next step. Besides faster uploads, a benefit of this change is that it visualizes the progress of each step. In particular, this means users can now see how many of their assets were duplicates.

@mertalev mertalev added the cli Tasks related to the Immich CLI label Feb 19, 2024
Copy link

cloudflare-pages bot commented Feb 19, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4086972
Status: ✅  Deploy successful!
Preview URL: https://84923dd4.immich.pages.dev
Branch Preview URL: https://feat-cli-concurrent-upload.immich.pages.dev

View logs

@mertalev mertalev marked this pull request as ready for review February 19, 2024 02:18
@aviv926
Copy link
Contributor

aviv926 commented Feb 19, 2024

I wonder if this fixes the problem with large files as well?
#7052

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

@mertalev
Copy link
Contributor Author

I wonder if this fixes the problem with large files as well? #7052

I don't think this will affect that. This PR just makes more uploads happen at once - the way it uploads videos won't change.

@jrasm91 jrasm91 merged commit d5ef91b into main Feb 20, 2024
27 checks passed
@jrasm91 jrasm91 deleted the feat/cli-concurrent-upload branch February 20, 2024 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Tasks related to the Immich CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants