Skip to content

Further optimize Git clones #865

Description

@ahal

We started using shallow clones in Gecko to get clone times down to ~2 minutes, but I think there are further optimizations we can make. Marco recently shared this article which contains a bunch of tips:
https://about.gitlab.com/blog/supercharge-your-git-workflows/

I won't have time to prioritize this, so filing an issue to track it for now.

Activity

  1. ahochheiden commented on Sep 11, 2026

    @ahochheiden
    Contributor

    I tried various settings that did not yield significant improvements:

    • core.fscache=true (Windows only): no change on try. The Windows workers already have it in the system gitconfig.
    • core.compression=0: no change locally or on try, on either platform. The pack is built by the server and stored as received, so the client's compression level never applies to a clone.
    • core.fsync=none: no change anywhere.
    • http.postBuffer=1024M: no change. It sizes the upload buffer, and a fetch uploads very little.
    • fetch.unpackLimit=1: no change, every fetch already lands as a pack.
    • index.version=4: halves the index file (70 MB to 39 MB on a 466k entry no cone sparse index) with no measurable time change.
    • --filter=blob:none for full checkouts: much slower, measured locally on Windows only. The checkout hands one blob hash per path to git fetch --stdin, and the client spent about three minutes on that list before sending the request.
    • bundle URIs: incompatible with --depth, so unusable with shallow clones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions