Skip to content

gogetdoc is extremly slow on code that is using cgo #47

@segevfiner

Description

@segevfiner

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)

  1. 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()
}
  1. dep init.
  2. gogetdoc -pos main.go:#87.

Related

microsoft/vscode-go#667 microsoft/vscode-go#1025

cc @ramya-rao-a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions