Skip to content

Avoid wrapping the queued function in an extra closure in parallelWorkGroup - #63898

Draft
no-yan wants to merge 1 commit into
microsoft:mainfrom
no-yan:perf/workgroup-closure
Draft

Avoid wrapping the queued function in an extra closure in parallelWorkGroup#63898
no-yan wants to merge 1 commit into
microsoft:mainfrom
no-yan:perf/workgroup-closure

Conversation

@no-yan

@no-yan no-yan commented Aug 20, 2026

Copy link
Copy Markdown

Part of a series reducing allocation churn on hot paths (see #63895).

parallelWorkGroup.Queue wrapped each queued function in an extra
closure before handing it to the WaitGroup. sync.WaitGroup.Go
(Go 1.25+) already does the Add/Done bookkeeping, so pass fn through
directly — one less closure allocation per queued task.

Output on a full vscode/src check is byte-identical to main.

🤖 Generated with Claude Code

…kGroup

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant