-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Shallow clone for better performance #1544
Comments
Is there any update on this enhancement? |
Any update on this? We would also be helped by having a shallow clone option. Is there really any reason to ever want branch history in the cloned branch used by cloud config? |
Would like to have this feature, too. Sadly, jgit doesn't support shallow clone yet. See the bug and gerrit. It does support the partial clone though. You can achieve this by adding your own TransportConfigCallback callback = t -> {
t.setFilterSpec(FilterSpec.fromFilterLine("tree:0"));
t.setFilterSpec(FilterSpec.fromFilterLine("blob:none"));
} However, not all git servers comply with the partial clone spec, e.g. Azure DevOps doesn't |
I guess JGit supports in the meantime what is requested here:
|
Do not download the entire commit history from the remote. Execute the equivalent of `git clone --depth 1` Fixes spring-cloud#1544
Do not download the entire commit history from the remote. Execute the equivalent of `git clone --depth 1` Fixes spring-cloud#1544
Do not download the entire commit history from the remote. Execute the equivalent of `git clone --depth 1` Fixes spring-cloud#1544
Do not download the entire commit history from the remote. Execute the equivalent of `git clone --depth 1` Fixes spring-cloud#1544
We regularly see response times from our config server of 15-25 seconds. We have on average ~30 requests with response times > 15s each day. These high response times happen when config server is fetching from one of our repos and there are updates in that repo. There are often updates since any time someone creates a new feature branch and makes a change to it, that is an update.
This repo has many, many files in it (for multiple applications). Some of the files have 1000s of lines. But the biggest culprit, I believe, is that it has a huge amount of history.
We are looking at potentially breaking it into multiple repos (and use the new composite repos feature for shared configs). That will help. However, the team wants to migrate the history over to the new repos, so now we will have multiple repos with huge history instead of just one.
We were hoping that we could improve performance by configuring the config server to do a shallow clone of the repos (e.g.
git clone --depth 1
) . There doesn't appear to be an option for that right now.The Request: I'd like to request you to enhance the config server to allow for optionally doing a shallow clone.
I realize this might not be feasible. I'm nearly a novice with git, and not sure if such a shallow clone would "play nicely" with the existing config server repo wrt to updates, etc. Also, it appears that the jgit library itself does not expose an option for doing a shallow sync (though I could have missed something).
If not feasible, or not something that might be implemented in the next couple of releases, is there an existing alternative option that might help improve our config server's response time? (Even if this feature does get into the queue, is there something I can do right now to improve performance?)
Note: We're currently at Greenwich.SR3.
The text was updated successfully, but these errors were encountered: