Skip to content

perf: cache templates and pre-allocate maps and slices#223

Merged
indaco merged 1 commit intomainfrom
fix/performance-hotpaths
Mar 9, 2026
Merged

perf: cache templates and pre-allocate maps and slices#223
indaco merged 1 commit intomainfrom
fix/performance-hotpaths

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Mar 9, 2026

Description

Optimize hot paths by caching parsed templates in the changelog generator and pre-allocating maps/slices with known or estimated capacities across discovery, config, workspace, and plugin packages.

Related Issue

  • None

Notes for Reviewers

  • Template caching in changeloggenerator/generator.go avoids re-parsing the same contributor/new-contributor templates on every entry
  • All make(map) and make([]T) calls in hot loops now use capacity hints derived from input sizes
  • No behavioral changes; purely allocation reduction

@indaco indaco merged commit 65f3e70 into main Mar 9, 2026
7 checks passed
@indaco indaco deleted the fix/performance-hotpaths branch March 9, 2026 17:30
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