Git对于100,000个对象来说确实很慢。任何修复? [英] Git is really slow for 100,000 objects. Any fixes?

查看:102
本文介绍了Git对于100,000个对象来说确实很慢。任何修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新鲜的git-svn回购(11.13 GB),其中有超过100,000个对象。



我已经完成了

  git fsck 
git gc

然后我试着做一个

  git status 

执行git状态所需的时间是任何地方从2m25.578s到2m53.901s

我通过下面的命令测试了git的状态:

  time git status 

5次和所有时间在两次列出以上。

我在Mac OS X上执行此操作,本地不通过虚拟机。



没有办法,它应该采取这么久。



任何想法?帮助?



谢谢。

编辑

我有一位同事坐在我旁边,有一个可比较的盒子。使用jfs文件系统的内存更少,运行Debian。他的 git status 在同一个仓库中运行.3(它也是一个git-svn结帐)。

另外,我最近更改了我的文件权限(到777)在这个文件夹,它带来了相当大的时间(为什么,我不知道)。我现在可以在3到6秒内完成任何操作。这是可以管理的,但仍然是一个痛苦。

解决方案

现在我可以看到几个项目。 / p>


  1. git gc --aggressive

  2. 打开文件权限为 777

必须有其他内容,但这是最明显的影响。

I have a "fresh" git-svn repo (11.13 GB) that has over a 100,000 objects in it.

I have preformed

git fsck
git gc

on the repo after the initial checkout.

I then tried to do a

git status

The time it takes to do a git status is anywhere from 2m25.578s and 2m53.901s

I tested git status by issuing the command

time git status

5 times and all of the times ran between the two times listed above.

I am doing this on a Mac OS X, locally not through a VM.

There is no way it should be taking this long.

Any ideas? Help?

Thanks.

Edit

I have a co-worker sitting right next to me with a comparable box. Less RAM and running Debian with a jfs filesystem. His git status runs in .3 on the same repo (it is also a git-svn checkout).

Also, I recently changed my file permissions (to 777) on this folder and it brought the time down considerably (why, I have no clue). I can now get it done anywhere between 3 and 6 seconds. This is manageable, but still a pain.

解决方案

It came down to a couple of items that I can see right now.

  1. git gc --aggressive
  2. Opening up file permissions to 777

There has to be something else going on, but this was the things that clearly made the biggest impact.

这篇关于Git对于100,000个对象来说确实很慢。任何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆