gogetdoc seems to invoke cgo, which invokes the native compiler, which can be quite slow. It does this for every invocation, with no caching, even if there were no changes in the cgo code. This ends up making gogetdoc so slow that it is unusable when you have such a package in your dependency graph.
Steps to reproduce
You need to have ImageMagick available. (See https://github.com/gographics/imagick)
- Save the following as
main.go in a new go package directory:
package main
import "gopkg.in/gographics/imagick.v2/imagick"
func main() {
imagick.Initialize()
}
dep init.
gogetdoc -pos main.go:#87.
Related
microsoft/vscode-go#667 microsoft/vscode-go#1025
cc @ramya-rao-a
gogetdoc seems to invoke
cgo, which invokes the native compiler, which can be quite slow. It does this for every invocation, with no caching, even if there were no changes in thecgocode. This ends up makinggogetdocso slow that it is unusable when you have such a package in your dependency graph.Steps to reproduce
You need to have ImageMagick available. (See https://github.com/gographics/imagick)
main.goin a new go package directory:dep init.gogetdoc -pos main.go:#87.Related
microsoft/vscode-go#667 microsoft/vscode-go#1025
cc @ramya-rao-a