Skip to content

RFC: reduce the time it takes to clone the repository #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
aminya opened this issue Feb 19, 2021 · 2 comments
Closed
3 tasks done

RFC: reduce the time it takes to clone the repository #373

aminya opened this issue Feb 19, 2021 · 2 comments
Labels
Needs Discussion Needs further discussion. RFC Request for comments. Feature requests and proposed changes.

Comments

@aminya
Copy link

aminya commented Feb 19, 2021

Checklist

Please ensure the following tasks are completed before submitting a feature request.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Description

Description of the feature request.

I noticed that this repository is very huge, and it takes a long time to clone, which makes it hard to contribute.

image

There are multiple ways to reduce the size:

  • Generate the duplicated files instead of copying them
  • Moving some of the files to other links or repositories
  • Using git lfs
  • Removing the files that are not used anymore from the history.
Example script for cleaning history

PowerShell

# clone:
# git clone https://github.com/stdlib-js/stdlib.git
# cd "stdlib"

$paths = "some/folder",
         "some/file"

foreach ($path in $paths) {
   # using https://github.com/newren/git-filter-repo
   git filter-repo --invert-paths --path $path
   if (test-path $path) {
      rm $path -Recurse -Force
   }
   git reflog expire --expire=now --all && git gc --prune=now --aggressive
}
git remote add origin [email protected]:stdlib-js/stdlib.git
git push --set-upstream origin master -f
git push --force --all origin 

Related Issues

Does this feature request have any related issues?

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this feature request? This may include screenshots, references, sample output, and/or implementation notes.

No.

@kgryte
Copy link
Member

kgryte commented Feb 19, 2021

@aminya Thanks for filing this issue. We are certainly interested in exploring approaches for making this project easier to contribute to.

Re: clone times. One thing we suggest in our development guide, and which is not included in your suggestions above, is to limit the clone depth. We do this on our CI environments and seem to have decent success.

@kgryte kgryte added installation Needs Discussion Needs further discussion. RFC Request for comments. Feature requests and proposed changes. labels Feb 19, 2021
@kgryte
Copy link
Member

kgryte commented Mar 11, 2021

Another possibility for reducing clone time is performing a shallow clone + sparse checkout. This is discussed on SO.

aminya added a commit to aminya/stdlib that referenced this issue Mar 11, 2021
@aminya aminya mentioned this issue Mar 11, 2021
7 tasks
aminya added a commit to aminya/stdlib that referenced this issue Mar 11, 2021
@kgryte kgryte closed this as completed in 45f6535 Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion Needs further discussion. RFC Request for comments. Feature requests and proposed changes.
Projects
None yet
Development

No branches or pull requests

2 participants