How to speed up checkout for big repos?
See original GitHub issueI would like to limit number of cloned branches to minimum. As example, cloning of the master branch takes ~7s at ~3MiB/s rate:
$ time git clone --single-branch --branch master https://github.com/plokhotnyuk/jsoniter-scala.git
Cloning into 'jsoniter-scala'...
remote: Enumerating objects: 260, done.
remote: Counting objects: 100% (260/260), done.
remote: Compressing objects: 100% (221/221), done.
remote: Total 29660 (delta 39), reused 236 (delta 27), pack-reused 29400
Receiving objects: 100% (29660/29660), 13.22 MiB | 2.92 MiB/s, done.
Resolving deltas: 100% (10355/10355), done.
real 0m6,484s
user 0m2,249s
sys 0m0,368s
While the checkout action with the following configuration takes more than 1.5m:
- uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
fetch-depth: 100
Which options can be used to speed it up?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
speed up git in big repos with this trick (beginner) anthony ...
today I show a little tip for speeding up `git` operations in large repositories by enabling a feature flag! this made `git status`...
Read more >How to handle big repositories with Git | Atlassian Git Tutorial
Solution for big folder trees: git sparse-checkout · Clone the full repository once: 'git clone' · Activate the feature: 'git config core.sparsecheckout true' ......
Read more >Faster Git checkouts on NFS and SSD with parallelism
Parallel checkout produces the best results for (large) repos on SSDs and NFS mounts. It is not recommended for small repos and/or repos...
Read more >Get up to speed with partial clone and shallow clone
If your repository has a deep history full of large blobs, then this option can significantly reduce your git clone times. The commit...
Read more >Checkout large repository from gerrit is slow. - Google Groups
as the JGit object cache is allocated on the JVM's heap. git gc should be configured to generate bitmap indexes which speed up...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@plokhotnyuk i’m making perf improvements with https://github.com/actions/checkout/pull/70
i’ll merge it into master tomorrow and push a tag
v2-beta
@ericsciple Thank you a lot for you support!
The following config works fine and completes both steps in ~4 seconds:
It didn’t work with
depth=1
for me.Using of tags to get version of the latest release is quite handful, especially in case of multiple maintained branches.