You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go/types creates a quadratic amount of garbage evaluating the string corresponding to each of the N subexpressions of the concatenation. This makes go/types-based tools like cmd/vet run out of memory easily. Now that vet is run during go test that's a bigger problem than it used to be.
There is a simple fix: let go/types keep adding the pieces as it does, but make go/constant construct the final value lazily. I will send a CL for this for Go 1.10.
Given a program with a large string addition
go/types creates a quadratic amount of garbage evaluating the string corresponding to each of the N subexpressions of the concatenation. This makes go/types-based tools like cmd/vet run out of memory easily. Now that vet is run during go test that's a bigger problem than it used to be.
There is a simple fix: let go/types keep adding the pieces as it does, but make go/constant construct the final value lazily. I will send a CL for this for Go 1.10.
/cc @griesemer @adonovan
See the vet failures in #23222 and in particular #23222 (comment) for more details. CL on its way.
The text was updated successfully, but these errors were encountered: