Performance of MSYS vs. MSYS2

555 views
Skip to first unread message

Johannes Sixt

unread,
May 10, 2016, 1:12:36 PM5/10/16
to git-for...@googlegroups.com
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. Do you have an idea what the reason
for this degradation could be? Or how to remove it?

I've ensured that both directories are excluded from the virus scanner.
Both invocations use the same, independent, Git installation.

-- Hannes

Johannes Schindelin

unread,
May 12, 2016, 11:52:40 AM5/12/16
to Johannes Sixt, git-for...@googlegroups.com
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

Johannes Sixt

unread,
May 12, 2016, 12:58:29 PM5/12/16
to Johannes Schindelin, git-for...@googlegroups.com
Am 12.05.2016 um 17:37 schrieb Johannes Schindelin:
> 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.

Thanks, will try that.

I've already taken Process Monitor snapshots, but haven't had time to
investigate.

-- Hannes

Reply all
Reply to author
Forward
0 new messages