Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/gitclone/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ func mirrorConfigSettings(packThreads int) [][2]string {
{"pack.threads", strconv.Itoa(packThreads)},
{"pack.deltaCacheSize", "512m"},
{"pack.windowMemory", "1g"},
// LFS fetches are I/O-bound; the git-lfs default of 8 is too low.
// See git-lfs/git-lfs#6241 for an upstream change (unreleased) that
// raises the default to 3×NCPU.
{"lfs.concurrenttransfers", "100"},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply lfs.concurrenttransfers in snapshot clone before fetch

lfs.concurrenttransfers is written in mirrorConfigSettings, but LFS downloads happen in a separate snapshot working clone (withSnapshotClone/cloneForSnapshot in internal/strategy/git/snapshot.go, then git lfs fetch at line 744). A regular git clone does not carry arbitrary repo config keys like lfs.concurrenttransfers into the new clone, so this new setting is not seen by the command that actually performs LFS fetches and the default concurrency remains in effect. In practice this makes the commit’s intended throughput improvement a no-op unless the same config is also set (or passed via -c) on the snapshot clone before git lfs fetch.

Useful? React with 👍 / 👎.

}
}

Expand Down