Skip to content

Refactor: Load fingerprints from disk for skipped units instead of network request #297

Description

@jssblck

Context

From PR #289 review comment by @elldritch:

Ideally, we would load the fingerprints from units that exist on disk from the disk, which would allow us to avoid making the network request larger.

Current Behavior

When restoring cached units, we request ALL units (including skipped ones) from the remote because we need their fingerprint data to populate dep_fingerprints. Even when a unit is already on disk, we fetch its fingerprint from the network.

Proposed Change

For units that already exist on disk (skipped units), read their fingerprints directly from disk and merge them with the network response. This would:

  1. Reduce network request size
  2. Reduce server load
  3. Improve restore performance for partial cache hits
  4. Potentially be more correct

Location

packages/hurry/src/cargo/cache/restore.rs around line 125-134

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions