Open
Description
Checklist
- I am using an up-to-date version.
- I have read the documentation.
- I have searched existing issues.
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 to YYYY/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
- Create a library with a lot of entries
- Move multiple files to a new directory
- Search & Relink the now-missing entries
- Observe that between every entry a second or more can pass
Logs
No response