A quick note about a few growing pains we've been hitting as our code base
has increased in size.
I recently started looking at our package hierarchy when one of my tests
started taking about 3 seconds to link, even with everything in page cache
(transparent hugepages are off, so I'm avoiding the problem I described in
The test depends on 163 packages. Some of them have nothing to do with the
test. We need to clean up our package hierarchy. We could probably get it
down to about 100 packages with careful refactoring. Maybe 120 is more
According to perf, the two hot spots in 6l are for loops in zaddr and patch
that together take up about 50%+ of the link time.
Our $GOPATH/bin contains about 80 binaries, totaling 964 MB.
The biggest binary that includes almost all our code is 25 MB. We usually
deploy about 20 of these binaries to a server.
We could get a significant saving in link time and storage (which
translates to a smaller initramfs for our deployment) by using a "busybox
trick" to build all our commands as a single binary that looks at argv
to decide what to run. Having most of our code in a shared library would be
the other option.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.