I'm setting up my first Hudson + Git project (previously done many with Hudson + SVN). I expected the clone stage to be slow, as our repository is quite large, but subsequent builds where a fetch + merge is being used are just as long. The following options are enabled:
I am not doing a "Wipe out workspace".
... Fetching changes from the remote Git repository Fetching upstream changes from git@github.com:username/ProjectFoo.git [Foo] $ git fetch -t git@github.com:username/ProjectFoo.git +refs/heads/*:refs/remotes/origin/*
At this point it stalls for a very long time. Once it finally finishes, it appears to progress as expected:
[Foo] $ git ls-tree HEAD [Foo] $ git rev-parse origin/mybranch Commencing build of Revision c883d59dd5a506a0b586f679a256f539712bfccc (origin/mybranch) GitAPI created Checking out Revision c883d59dd5a506a0b586f679a256f539712bfccc (origin/mybranch) [Foo] $ git checkout -f c883d59dd5a506a0b586f679a256f539712bfccc [Foo] $ git tag -a -f -m "Hudson Build #2" hudson-Foo-2 Recording changes in branch origin/mybranch [Foo] $ git whatchanged --no-abbrev -M --pretty=raw c883d59dd5a506a0b586f679a256f539712bfccc..c883d59dd5a506a0b586f679a256f539712bfccc Cleaning workspace [Foo] $ git clean -fdx ...
When I run the same fetch
command from the Git Bash command line, it runs almost instantaneously.
Any idea what might be going on? Or hints to speed things up? Note, the cloned repository is 210MB. (About a decade's worth of code history.)
I've run into this problem as well, and figured out a workaround. When Hudson runs as a service, something is missing that your normal desktop environment has, which causes something to do with the network to have to re-load for each process. msys-1.0.dll attempts to load something in netapi32.dll which causes it to take so long. So I just downloaded plink.exe from PuTTY, and set my GIT_SSH env to use that instead. Problem averted.