saimn / sigal

yet another simple static gallery generator
http://sigal.saimon.org/
MIT License
894 stars 170 forks source link

Cache input_size to make updating faster #506

Closed dsschult closed 10 months ago

dsschult commented 10 months ago

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.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

saimn commented 10 months ago

Thanks!