Skip to content

git transfers are slow on macos #7988

@ehuss

Description

@ehuss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitA-networkingArea: networking issues, curl, etc.C-bugCategory: bugO-macosOS: macOSP-highPriority: High

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions