This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Git gui suggests running gc once in a while to optimize the repository and do that always when I open a NetBeans managed git repository as it hasn't been gc'd even once. As far as I know, JGit supports gc one way or another now and doing it would be very beneficial in some cases. For example, I just imported a git repository from svn (with git-svn) and the resulting .git totaled to 2.7GB which was way more than I would have expected. Running 'git gc --aggressive' reduced it down to 29MB, which was ways less than I expected. The difference is so huge it really makes sense to run it. Offering running JGit gc as often as git gui would would be an acceptable solution if it does anything useful regarding performance and disk usage.
Regarding the compression ratio, unsurprisingly it wasn't the real deal. The huge 2.7GB issue was because of Samba 'allocation roundup size' being 1048576 by default which rounded up all small object files up to 1MB and it stacked up. Running the gc naturally made a huge difference when all small objects where packed into one and the rounding didn't add up anymore. I tested JGit gc and it can also achieve good compression ratio compared to non-gc'd one so the point is still valid for improved performance. I could think it makes more of a difference when you use git over a network share where seeking an already opened file could be faster by some factor than searching for loose objects.
Performance of Netbeans-only managed git repositories is declining rapidly. The amount of loose objects is massive and when working over network filesystem, the lookup times are long. Manually running 'git gc' externally to get it packed up and tidy increases the performance back to normal.