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

go/types: audit memory usage for go1.17 #45580

Open
findleyr opened this issue Apr 15, 2021 · 1 comment
Open

go/types: audit memory usage for go1.17 #45580

findleyr opened this issue Apr 15, 2021 · 1 comment

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented Apr 15, 2021

With the merging of the dev.typeparams branch, a number of the types in go/types picked up additional fields that are only used during the type checking pass. Many users of go/types (particularly gopls) are sensitive to the memory footprint of a type checked package. Filing this issue as a reminder for go1.17: we should verify that we're not pinning memory unnecessarily.

I did a quick check using both pprof and a memory debugging tool that @heschi is experimenting with for gopls, and they indicated that typechecked packages in go1.17 consume perhaps 5-10% more memory than in go1.16. We're not yet convinced that these are accurate numbers, but such a relative change is probably meaningful. If accurate, a 5-10% increase is not so bad, though we could probably eliminate it.

CC @griesemer

@findleyr findleyr added this to the Go1.17 milestone Apr 15, 2021
@findleyr findleyr self-assigned this Apr 15, 2021
@findleyr
Copy link
Contributor Author

@findleyr findleyr commented Apr 29, 2021

Marking this as a release blocker until we determine that any memory regressions are acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant