views:

380

answers:

5

I love git and use it on OSX pretty much constantly at home. At work, we use svn on Windows, but want to migrate to git as soon as the tools have fully matured (not just TortoiseGit, but also something akin the really nice Visual Studio integration provided by VisualSVN). But I digress...

I recently installed msysgit on my Windows 7 machine, and when using the included version of bash, it is horrendously slow. And not just the git operations; clear takes about five seconds. AAAAH!

Has anyone experienced a similar issue?


Edit: It appears that msysgit is not playing nicely with UAC and might just be a tiny design oversight resulting from developing on XP or running Vista or 7 with UAC disabled; starting Git Bash using Run as administrator results in the lightning speed I see with OSX (or on 7 after starting Git Bash w/o a network connection - see @Gauthier answer).

Edit 2: AH HA! See my answer.

+1  A: 

I ma with msysgit , in a git 1.6.5.1.1367.gcd48, on Windows7 ultimate, and observe no such phenomenon.
clear is instantaneous, as are the git commands.

What version of msysgit are you using? If it is the most recent one, can you try a downgrade and see if that persists?
(although the latest msysgit issues don't mention a speed problem in a git bash session)

VonC
Kevin L.
The problem persists with 1.6.5.1. Are we using the same package?
Kevin L.
A: 

It's probably a matter of the prompt which analyzes your Git repository. You can test by doing "clear" somewhere outside of a Git repository. And you can accelerate it by either patching git-completion.bash or by playing tricks with core.filemode.

As for the Visual Studio integration: This is Open Source. It is unfair to expect others to work for you for free.

I also find it rather funny not to ask the question on the msysGit mailing list, but now I digress.

Dscho
Flaming on StackOverflow should not be tolerated. Please try to keep the discourse more civil
phord
It is funny. My comment was the _only_ comment with concrete technical information.The offer to assist in helping fix the issue is still open, you know?And of course I am quite upset that the issue was raised here, on stackoverflow, which I do not monitor, and which had to be pointed out by others to me. I would have preferred to hear about the issue directly.I don't know about you, but I find it unfair when the original project is not even notified of problems.
Dscho
+1  A: 

A colleague of mine had this behaviour whenever Outlook was running. Trying killing outlook and test again.

You could also try to test:

  • without connection to any network,
  • without antivirus running,
  • without any other program running.
Gauthier
Neither Outlook nor antivirus seem have any effect, but if I disable my network connection then start git, it is lightning (read: "Unix") fast, even after I reconnect. Interesting...
Kevin L.
Can you access network discs in git bash after that?
Gauthier
Yep. And git bash remains fast (until I close it and open another instance).
Kevin L.
A: 

The issue here might be the bash-completion if that's enabled, which is quite a bit slower on Windows than Linux.

Try setting the PS1-variable to something simple like "$ ", and see if this speeds things up. If it does, be aware that there's been some optimizations to the bash-completion in recent-ish git-versions. Perhaps you need to upgrade.

kusma
I'm running the absolute bleeding-edge newest version (see my comments on VonC's answer, above). But I'll give this a shot.
Kevin L.
1.7.0.2 isn't necessarily the bleeding-edge in this context. The optimizations I'm talking about have happened in upstream-git. I'm not sure if they were in for the 1.7.0.2 release of Git for Windows or not.
kusma
+1  A: 

The solution for slowness on Vista or 7 appears to be running Git Bash using Run as administrator (or disabling UAC for the Git Bash shortcut...or disabling UAC entirely). The difference is night and day and using git on 7 is awesome again.

This appears to be related to a known issue and, as I speculated, XP as a development environment for msysgit is partially responsible.

Kevin L.