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

Cache input_size to make updating faster #506

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

dsschult
Copy link
Contributor

By adding caching for input_size, image files that have previously been processed do not need to be opened at all when a gallery is updated. This improves update speed significantly, especially on slower systems with many image files. I've seen anywhere from a 1.5x to 10x improvement with ~50k images when testing this PR on various systems.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (943d77c) 88.70% compared to head (371a461) 88.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
+ Coverage   88.70%   88.72%   +0.02%     
==========================================
  Files          25       25              
  Lines        2062     2066       +4     
==========================================
+ Hits         1829     1833       +4     
  Misses        233      233              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@saimn saimn added this to the 2.5 milestone Jan 12, 2024
@saimn saimn merged commit c985cca into saimn:main Jan 12, 2024
8 checks passed
@saimn
Copy link
Owner

saimn commented Jan 12, 2024

Thanks!

@dsschult dsschult deleted the cache_input_size branch January 22, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants