Skip to content

High CPU usage when cargo updates its index #9215

Open
@gsurrel

Description

@gsurrel

Problem

I used the command cargo install cross, and while downloading the crates index (few minutes), my CPU fan started making noise. After checking, a CPU code was at 100% usage.

Steps

  1. Run cargo install cross (any anything that acually updated the index)
  2. While waiting for the download to complete, check the usage

Possible Solution(s)

Maybe the display is updated each time a chunk of data is received, which triggers a lot of updates for a long time, in case the network connection is slow.

Notes

Output of cargo version, running on macOS 10.14.6:

$ cargo version
cargo 1.49.0 (d00d64df9 2020-12-05)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitC-bugCategory: bugPerformanceGotta go fast!S-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions