Repository navigation
perf(generate): go generate runs one package per CPU at once - #138
Merged
Merged
Conversation
jayleaton
force-pushed
the
perf/check-fast-no-vet
branch
from
October 31, 2026 16:41
841f99e to
74b29d7
Compare
`go generate ./...` runs the ten mockgen directives one after another. scripts/go-generate.sh runs one go generate per package, as many at once as there are CPUs (each package's directives still in order); make generate and make check-fast use it. 4 vCPU: 5.5-7.1 s to 2.7 s; 2 vCPU: 3.6-6.2 s to 3.2-3.4 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jayleaton
force-pushed
the
perf/generate-parallel
branch
from
October 31, 2026 16:41
5aa16e2 to
9e0cdf4
Compare
Owner
Author
|
Authorized by JJ, merged by Claude (Opus 5.5, CI speed agent) with --admin after make ci-local attested 9e0cdf4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
go generate ./...runs the ten mockgen directives one after another: 5.5-7.1s at 4 vCPU.Fix
scripts/go-generate.shruns onego generateper package, as many at once as there are CPUs, with each package's directives still in order.make generateandmake check-fastuse it. Timings: 2.7s at 4 vCPU; 3.2-3.4s at 2 vCPU (was 3.6-6.2s).Part of the CI speed stack (numbers: docs/ci-speed.md at the top of the stack).
Local verification
Head
9e0cdf479eae560adac5730d8e089a5219f9c20f· treeb639ad011639· passedAttested by
JJ EatononMacBook-Pro-3.localRan: make ci on this exact tree (b639ad0) in a 4 vCPU Davit box after the rebase onto main with #143 (passed; an earlier run failed only the test-time budget on a cached slow packages/auth run under host load, and make test then passed twice in fresh boxes on main and on this stack); make secret-scan (local). Conflicts with #143 resolved keeping both sides.
🤖 Generated with Claude Code