Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] JGit slow?

2012/12/19 Pyeron, Jason J CTR (US) <jason.j.pyeron.ctr@xxxxxxxx>
> -----Original Message-----
> From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-
> bounces@xxxxxxxxxxx] On Behalf Of Shawn Pearce
> Sent: Wednesday, December 19, 2012 10:07 AM
> To: Duft Markus
> Cc: JGit Developers list (jgit-dev@xxxxxxxxxxx)
> Subject: Re: [jgit-dev] JGit slow?
>
> On Tue, Dec 18, 2012 at 11:15 PM, Duft Markus <Markus.Duft@xxxxxxxxxx>
> wrote:
> > Hm, actually i don't even care whether comparison is fair in this
> case.
>
> I think there are two issues JGit team needs to look at here...
>
> > This
> > time i have my user-hat on :D if the answer is "to fix it we need
> local
> > mode" then thats an answer too ;) I just noticed that in the
> situation i
> > have, i'm way faster with native git, so i had to switch.
>
> We are missing the local mode optimization. Doing it the way CGit does
> it from Java will be difficult, CGit uses filesystem hardlinks to
> efficiently copy object and pack files on the same filesystem. Java
> doesn't support these. So we will have to implement the local version

http://docs.oracle.com/javase/tutorial/essential/io/links.html


> as copying the files, which will be slower than CGit's approach if its
> the same filesystem. Unless we build some optional JNI to get us
> access to link(2).

In case of older java

http://stackoverflow.com/questions/783075/creating-a-hard-link-in-java

JNA has a LGPL 2.1 license which isn't acceptable for JGit licensed under EDL.
 
or don't support links in case of older java.

>
> > I'd love to get
> > rid of that workaround again, so i can avoid exec'ing native from
> java code
> > (i hate it) and instead get back to JGit APIs.
>
> The other issue here is I think JGit is mistuned in most applications,
> making it slower to even do a clone of a remote server's repository.

then we should document how to correctly tune JGit

--
Matthias 

Back to the top