Why does x/tools/go/packages use `go list` under the hood?

82 views
Skip to first unread message

Matt Mueller

unread,
Aug 17, 2020, 5:22:52 PM8/17/20
to golang-nuts
Hi folks,

I was looking into where my packages.Load time was being spent and I noticed that under the hood the packages library calls out to "go list" for information.

I'm just wondering if there's any specific reason for this? It seems like fairly low-hanging fruit performance-wise to not spawn additional processes.

Thanks!
Matt

Matt Mueller

unread,
Aug 17, 2020, 5:34:03 PM8/17/20
to golang-nuts
I think I got it. It looks like `go list` uses an internal cache to make its use really fast. Hopefully this package gets merged into the stdlib and we can take advantage of the cache directly!
Reply all
Reply to author
Forward
0 new messages