You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your Windows build number: (Type ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.16299.125]
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots) git diff
What's wrong / what should be happening instead:
The command takes ~450 ms to execute / The execution should be nearly instantaneous
Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here)
N/A
When working on Ubuntu, I use a fairly complex command prompt that detects if my working directory is part of a git repository. If so, the prompt also adds information about the current branch and its status.
I noticed that there was an unusual latency (~1 second) between the end of a command and the display of the prompt, so I set -x to identify the bottleneck and realized that half of the time was spent running git diff, which I then confirmed by running the command with time (which consistently reports ~450 milliseconds).
If this can be useful, I'm currently running the Docker for Windows (version 17.12.0-ce-win45 (15017), channel edge, build 6bbf198) using the experimental option "Linux containers on Windows" and by running the same git diff on the same repository inside a docker container based on the ubuntu image, the times are slightly better (around ~350 milliseconds).
Furthermore, running git diff on the bash that is installed as part of Git for Windows yields even better times (~200 milliseconds).
On a virtual machine provisioned on OpenStack with comparable resources but running Ubuntu natively, the execution of git diff on the same repository is nearly instantaneous (~1 millisecond).
I can imagine this is due to the many levels of indirections that are involved in the whole WSL, but I was wondering if there's something in particular that causes this slowdown.
The text was updated successfully, but these errors were encountered:
Your Windows build number: (Type
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.16299.125]
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
git diff
What's wrong / what should be happening instead:
The command takes ~450 ms to execute / The execution should be nearly instantaneous
Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here)N/A
When working on Ubuntu, I use a fairly complex command prompt that detects if my working directory is part of a
git
repository. If so, the prompt also adds information about the current branch and its status.I noticed that there was an unusual latency (~1 second) between the end of a command and the display of the prompt, so I
set -x
to identify the bottleneck and realized that half of the time was spent runninggit diff
, which I then confirmed by running the command withtime
(which consistently reports ~450 milliseconds).If this can be useful, I'm currently running the Docker for Windows (version 17.12.0-ce-win45 (15017), channel edge, build 6bbf198) using the experimental option "Linux containers on Windows" and by running the same
git diff
on the same repository inside adocker
container based on theubuntu
image, the times are slightly better (around ~350 milliseconds).Furthermore, running
git diff
on thebash
that is installed as part of Git for Windows yields even better times (~200 milliseconds).On a virtual machine provisioned on OpenStack with comparable resources but running Ubuntu natively, the execution of
git diff
on the same repository is nearly instantaneous (~1 millisecond).I can imagine this is due to the many levels of indirections that are involved in the whole WSL, but I was wondering if there's something in particular that causes this slowdown.
The text was updated successfully, but these errors were encountered: