Re: git checkout running very slowly (>12s)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Cameron <andrew <at> worksmartlabs.com> writes:

> 
> $ git --version
> git version 1.7.0.4
> 

In the interest of leaving a message of hope in the archives for users 
experiencing this same problem, I will record to the list that I managed to 
solve the problem, if not understand it.  As you can see in the transcript 
above, I had been using an older version of git:

> $ git --version
> git version 1.7.0.4

After running sudo apt-get build-dep git-core and then building git from
source, we see this instead:

> $ git --version
> git version 1.7.5.4

And the success story:

$ time git checkout master
Switched to branch 'master'
git checkout master  0.88s user 0.25s system 99% cpu 1.135 total
$ time git checkout -
Switched to branch 'newbranch'
git checkout -  0.87s user 0.25s system 99% cpu 1.121 total

It might be interesting to note that both before and after upgrading git, 
running "strace -c git checkout master" in an attempt to figure out where all my 
time was spent was *not* particularly helpful.  An excerpt from strace's output 
from before the upgrade:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.003499           0     90884         7 lstat64

And another one from afterwards:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 99.24    0.003276           0     90886         7 lstat64

In other words, it appears that an efficient lstat implementation was not the 
key factor in this problem.  The root cause remains a mystery, but in my case, 
the solution was to upgrade Git.

Thanks for reading.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]