Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/gocode: use many fewer go/packages.LoadMode bits
We just need a package's name and type information. We don't need its syntax nor do we need to load dependencies, both of which multiply the cost of go/packages. `go generate` for encoding/gocode drops from ~1.55s to ~0.45s on my laptop after this change, which should help CI. Currently, its `go generate ./...` step with a warm Go cache is one of the slowest, clocking in at 12s. Slow generation steps are particularly harmful as they are sequential. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I06cc023bedfee5cadf5313cf001b35bce9f41af3 Dispatch-Trailer: {"type":"trybot","CL":1201336,"patchset":1,"ref":"refs/changes/36/1201336/1","targetBranch":"master"}
- Loading branch information