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

git transfers are slow on macos #7988

Closed
ehuss opened this issue Mar 12, 2020 · 0 comments · Fixed by rust-lang/git2-rs#527 or #7996
Closed

git transfers are slow on macos #7988

ehuss opened this issue Mar 12, 2020 · 0 comments · Fixed by rust-lang/git2-rs#527 or #7996
Labels
A-git Area: anything dealing with git A-networking Area: networking issues, curl, etc. C-bug Category: bug O-macos OS: macOS P-high Priority: High

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 12, 2020

Problem
Starting with nightly which includes #7939, I believe there is an issue where git fetches tend to be very slow on macos (repro on 10.14 and 10.15). I can't repro on Linux.

Fetching a relatively small repo like https://github.com/alexcrichton/bzip2-rs.git regularly takes about 1 minute for me, whereas previously it was about 2 seconds. It doesn't happen all the time, but the majority it does.

Attaching with a debugger it seemed to just be stuck in socket_read, however I have not investigated much.

Switching to Cargo's git2 curl implementation fixes the issue (it fetches in less than a second). This can be easily triggered by setting HTTP_TIMEOUT=60.

Steps

  1. In a blank project, add a git dependency to https://github.com/alexcrichton/bzip2-rs.git.
  2. cargo fetch
  3. Takes about 1 minute to finish when it should be about 2 seconds.
@ehuss ehuss added C-bug Category: bug A-git Area: anything dealing with git O-macos OS: macOS A-networking Area: networking issues, curl, etc. P-high Priority: High labels Mar 12, 2020
alexcrichton added a commit to alexcrichton/cargo that referenced this issue Mar 13, 2020
bors added a commit that referenced this issue Mar 13, 2020
ehuss pushed a commit to ehuss/cargo that referenced this issue Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git A-networking Area: networking issues, curl, etc. C-bug Category: bug O-macos OS: macOS P-high Priority: High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant