Skip to content

Conversation

@TheBobBobs
Copy link
Contributor

Summary

Optimize the way unlinked entries are calculated and move logic into Library scanning since it can be quickly calculated with data from scan.

Scanning a library is now split into 3 steps.

  1. Fetch all existing entry paths with ids. Collect into a dict[str, int] and set[str]
  2. Using ripgrep or wcmatch get all valid files in library dir. Collect into set[str]
  3. Use set operations to calculate which paths are new or missing.

If there are any missing paths the unlinked entries ui will be opened.
When the unlinked ui is closed new entries will automatically be saved if there are no remaining missing paths.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Linux x86
  • Tested For:
    • Basic functionality

@CyanVoxel CyanVoxel added Type: Refactor Code that needs to be restructured or cleaned up TagStudio: Library Relating to the TagStudio library system Type: Performance An issue or change related to performance Status: Review Needed A review of this is needed labels Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Review Needed A review of this is needed TagStudio: Library Relating to the TagStudio library system Type: Performance An issue or change related to performance Type: Refactor Code that needs to be restructured or cleaned up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants