stash/pkg/match
abdusalam.dihan 93a05fce8f Use sync.Map instead of LRU for the per-job regexp cache
The preceding commit added lru.Cache for the compiled-regexp cache to
match the style in pkg/sqlite/regex.go. That file's use case is
different: a small bounded cache serving a read-dominated workload. The
auto-tag regexp cache is job-scoped (so eviction buys us nothing) and
hit by every worker on every candidate (so the LRU's per-Get mutex
becomes contention, measurable under the parallel worker pool).

sync.Map's read-optimised path avoids the contention without changing
any observable behavior. Kept as a separate commit so it can be
reverted independently if upstream prefers the LRU approach — the
first commit stands on its own either way.
2026-04-19 22:22:37 +01:00
..
cache.go Use sync.Map instead of LRU for the per-job regexp cache 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