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.

Comment From: dungtm007

Is there any update on this enhancement?

Comment From: Michael-S-Smith

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?

Comment From: vladonemo

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 to the repository, e.g.:

        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

Comment From: michael-schnell

I guess JGit supports in the meantime what is requested here:

Shallow Clone and Fetch The following methods were added to CloneCommand and FetchCommand to tell the server that the client doesn't want to download the complete history - setDepth supporting fetch option --depth - setShallowSince supporting fetch option --shallow-since - addShallowExclude supporting fetch option --shallow-exclude

https://wiki.eclipse.org/JGit/New_and_Noteworthy/6.3

Comment From: adelriodev

Hi there! Are there any updates on this on this enhancement?