Skip to content

perf: add regex cache, sync.Once templates, and atomic fail-fast#231

Merged
indaco merged 2 commits intomainfrom
perf/critical-fixes
Mar 11, 2026
Merged

perf: add regex cache, sync.Once templates, and atomic fail-fast#231
indaco merged 2 commits intomainfrom
perf/critical-fixes

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Mar 11, 2026

Description

Performance improvements across changelog generation and workspace execution:

  • (changelog parser) Add thread-safe regex cache with sync.RWMutex to avoid recompilation of exclude/group patterns
  • (changelog generator) Replace nil-check template caching with sync.Once for thread-safe contributor template initialization
  • (workspace executor) Replace mutex-based fail-fast check with atomic.Bool and CompareAndSwap for lock-free signaling

Related Issue

  • None

Notes for Reviewers

  • None

indaco added 2 commits March 11, 2026 22:28
- Cache compiled regexes with RWMutex to avoid recompilation.
- Use sync.Once for contributor template initialization to eliminate race conditions.
…cation

Replace mutex-based fail-fast with atomic.Bool and CompareAndSwap.
@indaco indaco merged commit fbed672 into main Mar 11, 2026
7 checks passed
@indaco indaco deleted the perf/critical-fixes branch March 11, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant