This repository was archived by the owner on Mar 23, 2021. It is now read-only.
Conversation
3e771e7 to
7ba740e
Compare
mvdan
approved these changes
Aug 27, 2019
Collaborator
mvdan
left a comment
There was a problem hiding this comment.
Also, their->there in the commit message.
9f0182e to
9b85e55
Compare
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 there 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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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".