Skip to content

depgraph: ~Make it useful~ make it fast

Administrator requested to merge ef/depgraph-SPEED into main

Created by: efritz

depgraph runs in a few ms or whatever now idk (used to take several minutes)

Instead of invoking go list commands for every package to get a precise list of imports we can just do a single pass over the source tree and parse the same information ourselves. Since we're only interested in relative paths, we can ignore all of the stuff with go.mod trickery here (and once we need it we can easily build it in, as go mod rewrites are just a simple mapping).

Removed the cache because we can now.

Merge request reports

Loading