Skip to content

Conversation

@heyitsanthony
Copy link

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