Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache GOROOT at init time #717

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

heyitsanthony
Copy link
Contributor

When GOROOT is not set as an environment variable, GetBuildContext
fetches it from 'go env GOROOT', which takes about 50ms on my machine.
This overhead can almost double the time it takes to run an update since
GetBuildContext is called relatively frequently.

Instead, read GOROOT during initialization and cache it for
GetBuildContext.

When GOROOT is not set as an environment variable, GetBuildContext
fetches it from 'go env GOROOT', which takes about 50ms on my machine.
This overhead can almost double the time it takes to run an update since
GetBuildContext is called relatively frequently.

Instead, read GOROOT during initialization and cache it for
GetBuildContext.
@mattfarina mattfarina added this to the 0.13 milestone Apr 7, 2017
@mattfarina mattfarina merged commit da6220c into Masterminds:master Apr 7, 2017
mattfarina added a commit that referenced this pull request Apr 7, 2017
@mattfarina
Copy link
Member

@heyitsanthony thanks for the contribution!

@heyitsanthony heyitsanthony deleted the cache-goroot branch April 8, 2017 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants