Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: binary size regression #67588

Closed
prattmic opened this issue May 22, 2024 · 4 comments
Closed

all: binary size regression #67588

prattmic opened this issue May 22, 2024 · 4 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@prattmic prattmic added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 22, 2024
@prattmic prattmic added this to the Go1.23 milestone May 22, 2024
@prattmic
Copy link
Member Author

Looks like the cause is 180ea45 / https://go.dev/cl/585820.

$ go test -c gonum.org/v1/gonum/graph/community

community.test is 4616661 bytes at 647870b and 5377941 bytes at 180ea45 (+16%).

These binary size benchmarks all happen to be test binaries. I'm guessing the new internal/coverage/cfile test dependency is bigger than expected.

Since this is only test binaries, it seems a bit less concerning. Still, it is surprising that what is theoretically "just" a refactor has such a big binary size impact.

cc @rsc @thanm @cherrymui

@cherrymui
Copy link
Member

My guess is that previously the coverage stuff is only built if coverage is enabled. Now it is always built, just disabled if -cover is not set.

@thanm
Copy link
Contributor

thanm commented May 23, 2024

I have some ideas on how to fix this, I'll look into it this morning.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/587795 mentions this issue: cmd/go,testdeps: move import of internal/coverage/cfile to testmain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Development

No branches or pull requests

4 participants