Skip to content
Calcrivo

Fetch Time Calculator

Estimate how long `git fetch` will take based on the number of new objects since your last sync and available bandwidth.

Inputs

objects

Count of new commits, trees and blobs the remote has that you don't.

KB

Average compressed size per object (commits/trees are small, blobs vary).

Mbps

Network throughput available for the fetch.

Estimated Fetch Time

0ms

Data Transferred

3.13MB

Step by step

  1. Transfer size: delta objects × avg size

    400 × 8KB

    = 3200KB

  2. Bandwidth in KB/s

    100Mbps × 1000 / 8

    = 12500KB/s

  3. Fetch time: size / bandwidth

    3200KB / 12500KB/s

    = 0.26s

How it works

Unlike a clone, a fetch only transfers objects the remote has that your local repository lacks. Formula: time = delta_objects × avg_object_size / bandwidth. Delta object count grows with how long it's been since your last fetch and how active the branches you're tracking are, so frequent fetches keep this number — and the time it takes — small.

Formula

fetch_time_sec = (delta_objects × avg_object_size_KB) / (bandwidth_Mbps × 1000 / 8)

delta_objects
New objects since last fetch
avg_object_size_KB
Average compressed object size (KB)
bandwidth_Mbps
Available network bandwidth (Mbps)

Frequently Asked Questions

Why does `git fetch` sometimes take longer than expected?

If you haven't fetched in a long time, or if someone pushed large binary blobs, the delta object count and average object size both spike, increasing transfer size well beyond a typical incremental sync.

Does fetching multiple remotes/branches change this?

Yes — each ref you track adds its own delta objects. Fetching a single feature branch is far cheaper than `git fetch --all` on a repo with hundreds of branches.

How can I reduce fetch time in CI?

Use a persistent clone/cache between CI runs so each fetch is incremental rather than a fresh clone, and consider `git fetch --filter=blob:none` if you don't need full blob history for the fetch step.

Is fetch time affected by server-side processing?

Yes — the server needs to compute the pack of missing objects to send you, which adds CPU-bound time on top of the pure network transfer this calculator models.

You might also need