How it works...
If you're experiencing slow Go compilation speed, there are a few things to consider. Firstly, Go 1.5 was the first Go compile written entirely in Go. This came with a large increase in compilation times, and every release since has improved this. If you're working with Go 1.5 or later, your first step should be upgrading to the latest version of Go.
Next, some analysis of dependencies can be critical. Some go packages have large dependency changes, and you may unknowingly be adding hundreds of thousands of lines of code with a single import. It's worthwhile analyzing your dependencies. This is possible with the Go list tool, but there are also third-party tools, including the new dep (https://github.com/golang/dep), godep ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access