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?
to your account
Follow-up from https://groups.google.com/d/topic/golang-nuts/syC4LpVf7sw
The link-time optimisation to prune unused methods is disabled when reflect.Value.Call() is used anywhere within a program.
With large codebases with many vendored libraries, it's hard to avoid including something which calls reflect.Value.Call(), e.g. anything that uses text/template.
This problem is causing serious bloat on kubernetes and openshift binaries.
One improvement that might be feasible is to enable pruning of methods of a type where:
The intention is to be able to prune methods which are provably non-reachable from any reflect.Value.Call() callpoint.
Such an improvement may be complex but I believe the commensurate reduction in binary sizes for projects such as kubernetes make it highly worth considering.
The text was updated successfully, but these errors were encountered:
@crawshaw as author of most of /src/cmd/link/internal/ld/deadcode.go, what's your take on the above?
Sorry, something went wrong.
No branches or pull requests