x/tools/go/packages: memory hungry in parsing the github.com/go-fonts/latin-modern module packages #57985
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?The version of the
golang.org/x/tools
module is v0.5.0.Does this issue reproduce with the latest release?
Yes
What did you do?
main.go:
go,mod:
Output:
What did you expect to see?
About several hundred of memory consumed.
What did you see instead?
About 3G memory consumed.
Each of the font source files only contains a
var TTF = []byte{...}
variable.It is unexpected to use so much memory.
When parsing the packages in the
github.com/tdewolff/canvas
module,which depends on the
github.com/go-fonts/latin-modern
module,my computer (8G memory) hangs for virtual memory are swapped in and out frequently.
The
github.com/tdewolff/canvas
module is a relative small module.My computer is able to parse much larger modules.
The text was updated successfully, but these errors were encountered: