Skip to content

UX: Update counters and covers in the background#4323

Closed
tschechniker wants to merge 1 commit intophotoprism:developfrom
tschechniker:feature/batch-performance
Closed

UX: Update counters and covers in the background#4323
tschechniker wants to merge 1 commit intophotoprism:developfrom
tschechniker:feature/batch-performance

Conversation

@tschechniker
Copy link

I have a library of about 150K of photos. Even with an optimized MariaDB every Approve/Archive Batch action takes about 4 seconds. I debugged and found that from these 4 seconds 3.5 seconds are used to regenerate counters. This can easily be done in the background.

Now if i move a photo to the archive it takes milliseconds again πŸ˜„

Acceptance Criteria:

  • Features and enhancements must be fully implemented so that they can be released at any time without additional work
  • Automated unit and/or acceptance tests are mandatory to ensure the changes work as expected and to reduce repetitive manual work ( already there )
  • Frontend components must be responsive to work and look properly on phones, tablets, and desktop computers; you must have tested them on all major browsers and different devices
  • Documentation and translation updates should be provided if needed
  • In case you submit database-related changes, they must be tested and compatible with SQLite 3 and MariaDB 10.5.12+

@CLAassistant
Copy link

CLAassistant commented Jun 7, 2024

CLA assistant check
All committers have signed the CLA.

@lastzero
Copy link
Member

@tschechniker Thank you so much! I apologize for not getting back to you sooner. Unfortunately, I've only just noticed this great suggestion.

However, while it seems like a generally good idea to update counters and covers in the background, it might affect the frontend in unexpected ways - so I'd rather not merge this without having time to properly test it. We'll make sure it doesn't get forgotten (again)! ⚠️

@lastzero lastzero self-assigned this Mar 27, 2025
@lastzero lastzero moved this to Development 🐝 in Roadmap πŸš€βœ¨ Mar 27, 2025
@lastzero lastzero added ux Impacts User Experience performance Performance Optimization labels Mar 27, 2025
@lastzero lastzero changed the title make batch count actions in background API: Update counters and covers in the background Mar 27, 2025
@lastzero lastzero changed the title API: Update counters and covers in the background UX: Update counters and covers in the background Mar 28, 2025
lastzero added a commit that referenced this pull request Mar 28, 2025
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member

@tschechniker Thanks again for your contribution! Based on your proof-of-concept, the above commit updates counters and covers in the background where possible. I will therefore go ahead and close this PR as it is no longer needed.

I'm very sorry we couldn't get this released sooner. 😞

@lastzero lastzero closed this Mar 28, 2025
@lastzero lastzero added the please-test Ready for acceptance test label Mar 28, 2025
@lastzero lastzero assigned tschechniker and unassigned lastzero Mar 28, 2025
@lastzero lastzero moved this from Development 🐝 to Preview 🐳 in Roadmap πŸš€βœ¨ Mar 28, 2025
@graciousgrey graciousgrey added tested Changes have been tested successfully and removed please-test Ready for acceptance test labels Apr 18, 2025
@graciousgrey graciousgrey moved this from Preview 🐳 to Release 🌈 in Roadmap πŸš€βœ¨ Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance Optimization tested Changes have been tested successfully ux Impacts User Experience

Projects

Status: Release 🌈

Development

Successfully merging this pull request may close these issues.

4 participants