$ time __git_ps1
((v2.6.33.4))
real 0m1.467s
user 0m0.864s
sys 0m0.564s
It's making my prompt unusable; on the other hand, though, it's too useful a feature to give up lightly. Any idea why it runs so slow and what I can do about it?
Setup details:
$ uname -a
Linux martin-laptop 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux
$ git --version
git version 1.7.1
$ du -sh .
876M .
I suspect something with my machine since on my coworker's box, in the kernel tree I cloned from, the same command returns instantly
$ time __git_ps1
((v2.6.33.4))
real 0m0.039s
user 0m0.008s
sys 0m0.016s
adding hdparm output:
mine
$ sudo hdparm -tT /dev/sda4
/dev/sda4:
Timing cached reads: 1542 MB in 2.00 seconds = 772.35 MB/sec
Timing buffered disk reads: 110 MB in 3.02 seconds = 36.42 MB/sec
coworker's
$ sudo hdparm -Tt /dev/sda6
/dev/sda6:
Timing cached reads: 1850 MB in 2.00 seconds = 926.03 MB/sec
Timing buffered disk reads: 210 MB in 3.02 seconds = 69.53 MB/sec
other differences: coworker is running git 1.6.5, i'm running 1.7.1