3

I have a code base counting about 2000 files. Working with JGit 4.3.1.201605051710-r on OS X El Captain 10.11.

Calling jgit init takes almost no time.

Calling jgit add . takes about 3sec. Even when calling it repeatedly, it takes 2.7sec.

Using git v2.8.2, it takes 2sec complete the git add . operation. However, subsequent calls take only 0.015sec.

Why is JGit so much slower? Even when the working copy is clean, the jgit add . command still runs for 3sec whilst git only for 0.015sec.

This huge slowness prevents me using JGit in my application where I need to run git add . and then git commit commands many times.

Pavel Lobodinský
  • 1,028
  • 1
  • 12
  • 25
  • It's a known bug, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=494323 – lslah Aug 15 '19 at 07:37
  • @Islah I know, I have reported the bug myself after not getting any response on this question :) – Pavel Lobodinský Aug 19 '19 at 08:47
  • Haha, funny enough. I was stumbling across the same problem, then first to this question and second to your bug ticket. I'm glad you've already reported and discussed the issue on the eclipse bug tracker. Thank you! – lslah Aug 20 '19 at 20:44
  • @Islah Glad I could help. At least there is s workaround. But even after these years the bug still refuses to leave the JGit :( – Pavel Lobodinský Aug 22 '19 at 04:25

0 Answers0