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

Only check remote is reachable when ttl timeout. #52

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

wudong
Copy link
Contributor

@wudong wudong commented Jul 28, 2020

What I did: only call repo.isReachable() when it is actually needed.

Why I did it: Calling repo.isReachable() each time give me a few seconds delay in my environment (WSL2/Ubuntu). Didn't check other environment.

Because the code path is executed for every invocation of the command line, it gives me a unbearable delay for using it.

Calling repo.isReachable() each time give me a few seconds delay in my environment.
@codecov-commenter
Copy link

Codecov Report

Merging #52 into master will decrease coverage by 4.33%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
- Coverage   67.03%   62.70%   -4.34%     
==========================================
  Files           3        3              
  Lines         182      185       +3     
==========================================
- Hits          122      116       -6     
- Misses         34       44      +10     
+ Partials       26       25       -1     
Impacted Files Coverage Δ
cache/cache.go 53.33% <0.00%> (-5.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d2b4a4...6d36cb1. Read the comment docs.

Copy link
Owner

@mstruebing mstruebing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow I didn't notice this behavior, thank you - great contribution 🚀

@mstruebing mstruebing merged commit 6d36cb1 into mstruebing:master Jul 29, 2020
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.

None yet

3 participants