Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Terrible performance cloning repositories with lots of tags

On Tue, Sep 18, 2012 at 6:25 PM, Alan <alan.mcgovern@xxxxxxxxx> wrote:
> A guy was complaining that checking out opensim (
> ) was taking forever in our IDE. I
> checked and the issue seems to be that there are over 10,000 tags and
> the last part of the cloning process seems to want to go through every
> tag and create a file for it in the .git/refs/tags directory. This is
> *incredibly* slow with this amount of tags. If I clone with the native
> git client, it does not create these files and is blazingly fast. Is
> this something that can be fixed easily? I'll patch it locally if you
> can tell me what needs to be done or if something is committed
> upstream.

git-core works around this by writing everything during clone in a
single shot to the packed-refs file. JGit doesn't have code to support
doing this at this time. The BatchRefUpdate API enables this, and
fetch/clone call it, but the implementation used by RefDirectory does
not write the batch out as a packed-refs update. Instead it loops
through and updates each reference one file at a time... resulting in
this bad performance.

I don't think there are any patches pending to fix this.

Back to the top