-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Cache git templates locally #450
Comments
Or there might be possible optimizations, like partial clones, or single branch clones:
|
If we go with caching: I guess we'll just need to fetch/pull each time we generate/update a project again, and if it fails clone the template repo again, do I understand correctly? |
When git 2.27 or newer is installed, we can add `--filter=blob:none` to avoid getting useless information from the git server. This makes clone much faster if your template has a big history. Close #450 (it does not exactly fix it, but maybe makes it irrelevant).
When git 2.27 or newer is installed, we can add `--filter=blob:none` to avoid getting useless information from the git server. This makes clone much faster if your template has a big history. Close #450 (it does not exactly fix it, but maybe makes it irrelevant).
When git 2.27 or newer is installed, we can add `--filter=blob:none` to avoid getting useless information from the git server. This makes clone much faster if your template has a big history. Close #450 (it does not exactly fix it, but maybe makes it irrelevant).
When git 2.27 or newer is installed, we can add `--filter=blob:none` to avoid getting useless information from the git server. This makes clone much faster if your template has a big history. Close #450 (it does not exactly fix it, but maybe makes it irrelevant).
For me copier takes 5.5 seconds when updating from a template stored in a remote git repo vs. 0.7 seconds when the template is checked out locally. I still think caching the template repo makes a lot of sense. The cache could be created in |
Maybe we can just use https://pypi.org/project/git-autoshare/ behind the scenes automatically. |
Two arguments against using
|
Fair points. Then we can just cache a local git mirror and use temporary worktrees to speed things up. |
Originally posted by @bburgin in #449 (comment)
And it's true. Copier should cache downloaded templates, so next fetches are faster.
The text was updated successfully, but these errors were encountered: