go/types: audit memory usage for go1.17 #45580
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.
The text was updated successfully, but these errors were encountered: