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

Don't make unnecessary calls to LazyFqdn.__str__. #376

Closed
wants to merge 1 commit into from
Closed

Don't make unnecessary calls to LazyFqdn.__str__. #376

wants to merge 1 commit into from

Conversation

@lndbrg
Copy link
Contributor

@lndbrg lndbrg commented Aug 15, 2014

Before this patch we always tried to expand variables in the
config even if they weren't present. This meant that we made an
expensive call to LazyFqdn.str the first iteration of the expand
loop, stealing precious cpu and user time.

We now check that the expansion actually exists in the config
before expanding it, this will speed up the case where %l is not
used.

This fixes #338

Before this patch we always tried to expand variables in the
config even if they weren't present. This meant that we made an
expensive call to LazyFqdn.__str__ the first iteration of the expand
loop, stealing precious cpu and user time.

We now check that the expansion actually exists in the config
before expanding it, this will speed up the case where %l is not
used.

This fixes #338
@coveralls
Copy link

@coveralls coveralls commented Aug 15, 2014

Coverage Status

Coverage decreased (-0.2%) when pulling 29e0963 on lndbrg:dont-stringify-fqdn-if-its-not-in-the-config into 991d56b on paramiko:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants