sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
942 stars 62 forks source link

graph: graph all GoPackage units together, for efficiency #263

Closed pararthshah closed 8 years ago

pararthshah commented 8 years ago

Depends on https://github.com/sourcegraph/srclib-go/pull/78

This uses the updated srclib-go grapher API to graph all GoPackage units in the repo in a single call to srclib-go. This avoids the duplicate work done to load and parse dependencies of the Go packages.

The GraphMultiUnitsRule rule will output a single GoPackage.graph.json for the entire repo, with all defs, refs and docs in a single json file.

Observed 10x reduction in total CPU time used for building sourcegraph/sourcegraph repo in local testing.

TODO: modify cli.Import to handle GraphMultiUnitsRule. This might be simplified with the graph store redesign.

beyang commented 8 years ago

lgtm after comments addressed.