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

Performance fixes for running ec2tag in non-aws environments #111

Merged
merged 1 commit into from Mar 23, 2017

Conversation

hairyhenderson
Copy link
Owner

Fixes #110

This does two things:

  1. caches the InstanceDescriber in case describer is called multiple times, and caches it earlier so that the e.metaClient.nonAws bool can be set earlier, avoiding unnecessary calls.
  2. gives the EC2 client an http.Client with a 500ms timeout

On my mac, this reduces the amount of time it takes to timeout a ec2tag function from 900ms to 500ms.

And in Linux, it's down from 21s to 500ms.

Signed-off-by: Dave Henderson dhenderson@gmail.com

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
@hairyhenderson hairyhenderson self-assigned this Mar 23, 2017
@hairyhenderson hairyhenderson merged commit 1fcee69 into master Mar 23, 2017
@hairyhenderson hairyhenderson deleted the increase-perf-for-ec2-calls-110 branch March 23, 2017 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant