stash/pkg/match
abdusalam.dihan cd64433dc5 Speed up file-based auto-tag
Replaces the per-file SQL QueryForAutoTag prefilter with an in-memory
2-rune prefix index over performers/studios/tags, preloaded once at job
start. Also:

  - runs file processing through job.TaskQueue so scenes/images/
    galleries tag in parallel instead of one file at a time
  - keyset-paginates the query loop so batch N+1 doesn't pay the
    O(offset) scan past large tables
  - bulk-loads studio/tag aliases via a new optional AllAliasLoader
    interface, avoiding N+1 GetAliases calls during preload
  - caches compiled name regexps (same candidate names repeat across
    thousands of files)
  - hoists strings.ToLower(path) and allASCII(path) out of the per-
    candidate match loop
  - opens a fresh write txn per applied match instead of holding one
    for every tagger phase

Tagger gains *AtPath methods that own the cache + txn manager, letting
the task code stay slim.
2026-04-19 22:22:37 +01:00
..
cache.go Speed up file-based auto-tag 2026-04-19 22:22:37 +01:00
cache_test.go Speed up file-based auto-tag 2026-04-19 22:22:37 +01:00
path.go Speed up file-based auto-tag 2026-04-19 22:22:37 +01:00
path_semantic_test.go Speed up file-based auto-tag 2026-04-19 22:22:37 +01:00
path_test.go Use case-insensitive matching in nameMatchesPath (#2378) 2022-03-11 09:35:48 +11:00
scraped.go Match tag names/aliases exactly when testing uniqueness (#6809) 2026-04-08 13:11:12 +10:00