2

I have 5 submodules and a git submodule update takes 6-8 seconds. The same git submodule update command on the same repo in ubuntu 13.10 takes 0.4 seconds.

In order to resolve this, I've tried everything listed in these two questions:

Msysgit bash is horrendously slow in Windows 7
Git/Bash is extremely slow in Windows 7 x64

I've performed the following:

  • Fresh windows x64 install using virtualbox with plenty of memory and 4 cores
  • Install msysgit in c:\git\
  • Disable UAC by turning off the luafv driver in the registry and setting UAC to 'never'
  • Run git bash as administrator
  • $HOME variable is on the C: drive
  • export PS1='$' in git bash
  • git config --global core.preloadindex true
  • git config --global core.fscache true
  • git config --global gc.auto 256
  • No antivirus installed

I'm out of ideas and figured I'd ask if anyone has had this same issue, specifically with submodule updates. Git performance otherwise is acceptable when implementing the above list of changes. I'm beginning to think the implementation of the git command in windows is actually at fault.

Community
  • 1
  • 1
Jeff Lamb
  • 5,755
  • 4
  • 37
  • 54

2 Answers2

1

Tried all of the above but after digging multiple hours I finally found a solution for an old and a brand new Windows box running msysgit 1.9.x.

Try setting %LOGONSERVER% to a "valid" value like \\%COMPUTERNAME%. In fact, setting it to any value other than empty yielded a stable and normal network performance for Git+SSH on both Windows boxes.

Running a super simple:

git ls-remote git@gitlab...
Old Windows: 27 s -> 0.8 s
New Windows:  7 s -> 0.8 s

Yep, that's 27 s for one request.

Both boxes are Jenkins slaves run by Windows Task scheduler. Performance normalized after logging on using RDP making this really tricky to debug. Jenkins' "System Information" page and its Environment Variables dump finally gave it away.

Jabe
  • 1,491
  • 1
  • 12
  • 14
  • On my PC, `git ls-remote` only take 0.5 seconds. Submodule updates still take 5-6 seconds, though. Glad you figured out your issue, though. – Jeff Lamb Jul 28 '14 at 21:44
  • 1
    Too bad, it was a long shot. Git on Windows is weird. – Jabe Jul 28 '14 at 21:52
0

The culprit was McAfee virus scanner. Only took me 2.5 years to figure it out. In troubleshooting a different issue, our IT team removed it entirely (I'm amazed they actually did this) and I took the opportunity to test this out. Submodule updates are 4x faster and compiling is 2x faster.

Jeff Lamb
  • 5,755
  • 4
  • 37
  • 54