Hi Hannes,
On Tue, 10 May 2016, Johannes Sixt wrote:
> One reason why I haven't switched to the new MSYS2 runtime, yet, is that I
> observe a severe performance disadvantage. After setting
>
> set GIT_EDITOR=true
>
> I observe for a do-nothing interactive rebase (best of 5) with the old MSYS
> runtime:
>
> D:\Projects\VCS> bash -c "time git rebase -i HEAD~5"
> Successfully rebased and updated detached HEAD.
>
> real 0m4.718s
> user 0m0.015s
> sys 0m0.031s
>
> and with the new MSYS2 runtime:
>
> D:\Projects\VCS> bash -c "time git rebase -i HEAD~5"
> Successfully rebased and updated detached HEAD.
>
> real 0m9.133s
> user 0m0.000s
> sys 0m0.015s
>
> This is almost twice the runtime.
Oomph. That *is* bad.
> Do you have an idea what the reason for this degradation could be? Or
> how to remove it?
The most likely explanation would be that MSYS2 is not as stripped-down
from Cygwin as MSys was. I'd wager a bet that it is easier to maintain
those MSYS2 patches on top of Cygwin, too...
> I've ensured that both directories are excluded from the virus scanner.
> Both invocations use the same, independent, Git installation.
Okay.
The best way to investigate the performance hotspots might be to run the
GIT_EDITOR (and only the GIT_EDITOR) through `strace -o ...`. I already
have code in
http://github.com/git-for-windows/git/commit/39858004 to run
spawned programs through `strace`, but not to redirect its output. And I
would want to redirect the output to interfere as little as possible with
the regular execution.
Hopefully this will help you to hack the code to help you diagnose this.
Ciao,
Dscho