Skip to content

chore: use strings.Builder in validator#1020

Merged
andrinoff merged 1 commit intofloatpane:masterfrom
mavonx:fix/issue-963
Apr 26, 2026
Merged

chore: use strings.Builder in validator#1020
andrinoff merged 1 commit intofloatpane:masterfrom
mavonx:fix/issue-963

Conversation

@mavonx
Copy link
Copy Markdown
Contributor

@mavonx mavonx commented Apr 26, 2026

What?

Replaced repeated += string concatenation in i18n/validator.go with strings.Builder.

Why?

Each += on a string allocates a new string, leading to O(n²) allocations when building large validation reports with many languages and missing keys.

Closes #963

@mavonx mavonx requested a review from a team as a code owner April 26, 2026 07:37
@github-actions github-actions Bot added the chore Maintenance, refactor, cleanup label Apr 26, 2026
@andrinoff andrinoff changed the title chore: use strings.Builder chore: use strings.Builder in validator Apr 26, 2026
@andrinoff
Copy link
Copy Markdown
Member

lgtm

@andrinoff andrinoff merged commit 8e1a1fe into floatpane:master Apr 26, 2026
17 checks passed
@mavonx mavonx deleted the fix/issue-963 branch April 26, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, refactor, cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: String concatenation in loop in i18n validator report

2 participants