[Feature Request]: Optimize _match_missing_file #610
Labels
Type: Enhancement
New feature or request
Type: QoL
A quality of life (QoL) enhancement or suggestion
Checklist
TagStudio Version
Alpha 9.4.0+
Operating System & Version
NixOS unstable
Description
the Search & Relink feature for missing files is incredibly slow for larger libraries, since for every missing entry it walks the library directory again. Extremely noticeable on larger library.
(I noticed this when reorganizing my photos folder from
YYYY/
folders toYYYY/MM/DD/
folders, so there were ~11000 moved files)Expected Behavior
The list of files in the library should be cached between calls to _match_missing_file to speed up unlinked entry Relinking.
In a bodge solution I added a simple member
_cache
to the Library class, and in _match_missing_file initialize it with the result of os.walk, if not already set.Steps to Reproduce
Logs
No response
The text was updated successfully, but these errors were encountered: