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

Albums: Don't save to YAML every time the background worker runs #2705

Closed
lastzero opened this issue Sep 14, 2022 · 2 comments
Closed

Albums: Don't save to YAML every time the background worker runs #2705

lastzero opened this issue Sep 14, 2022 · 2 comments
Assignees
Labels
enhancement Refactoring, improvement or maintenance task performance Performance Optimization released Available in the stable release

Comments

@lastzero
Copy link
Member

lastzero commented Sep 14, 2022

The moments background worker currently calls BackupAlbums() on every execution, which can result in many album YAML backup files being written every 15 minutes, causing high CPU and disk load.

Since the album backups are updated anyway when changes are made, this is not strictly necessary. Users can also run the backup CLI command for this if they want to make sure they have a full backup.

@lastzero lastzero self-assigned this Sep 14, 2022
@lastzero lastzero added the performance Performance Optimization label Sep 14, 2022
lastzero added a commit that referenced this issue Sep 14, 2022


Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero changed the title Performance: Don't save albums as YAML every time the background worker runs Albums: Don't save to YAML every time the background worker runs Sep 14, 2022
@lastzero lastzero added the please-test Ready for acceptance test label Sep 14, 2022
@jayme-github
Copy link

Thanks!
FWIW: This only works after the user has created at least one album (as that triggers the creation of the entity.AlbumDefault directory). Not sure if that's intended.

@lastzero
Copy link
Member Author

The current detection mechanism is quite simple and could be replaced e.g. by a lock file. Feel free to submit a pull request.

@lastzero lastzero added the enhancement Refactoring, improvement or maintenance task label Sep 16, 2022
@lastzero lastzero added released Available in the stable release and removed please-test Ready for acceptance test labels Nov 2, 2022
@lastzero lastzero closed this as completed Nov 2, 2022
@lastzero lastzero moved this to Released 🌈 in Roadmap 🚀✨ Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactoring, improvement or maintenance task performance Performance Optimization released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

2 participants