This repository was archived by the owner on Mar 23, 2021. It is now read-only.
main: optimise "runtime" steps #80
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
gobin maintains binaries in its own cache. The key for a cache entry is
a function of main package path, version and build tags. Assuming nobody
tampers with the build cache (making it readonly is the subject of #5),
then we need only install to the cache entry if a file does not already
exist.
Also, optimise go list calls by using -find; we don't care for the
dependencies in these steps.
No change in tests because their should be no change in behaviour.
With some incredibly unscientific timing tests on my machine, this
reduces the time taken for "gobin -run github.com/myitcv/gobin -help"
from 0.636s to 0.246s. "gobin -help" times at 0.070s which means ~0.176s
of gobin "overhead".