Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow compared to Powershell posh-git #45

Open
Mrazator opened this issue Apr 6, 2020 · 7 comments
Open

Very slow compared to Powershell posh-git #45

Mrazator opened this issue Apr 6, 2020 · 7 comments

Comments

@Mrazator
Copy link

Mrazator commented Apr 6, 2020

Hey,

I just installed it and it seems that it does the trick, but it is very slow compared to powershell's posh-git. After each pressed 'enter' in the console I have to wait ca 3 sec or more to actually give me a new (re-counted) line. Is this normal behavior?

@Mrazator
Copy link
Author

Currently it seems to be pretty slow (I am using WSL v1.) compared to git in powershell. But TBH I don't remember how fast/slow it was on back then, when I was trying out this extension. It might be the reason behind this extreme snowlines or might not. Not sure.

@jonathanbass
Copy link

jonathanbass commented May 29, 2020

Yes I am using WSL 2 and it is very slow on there when the git files are on the mounted C:\ drive. This is a git problem though, which is a known WSL performance problem when using /mnt files: microsoft/WSL#4197

@bgolinvaux
Copy link

I am using Ubuntu 20 in WSL2. Thanks for porting this very useful tool!

Small detail: I noticed that after installing it and sourcing .bashrc, the initial coloring of the user name, host and the rest of the previous prompt is not colored anymore. That's a very minor issue, but if somebody knows how to fix it, thanks in advance :)

@lyze
Copy link
Owner

lyze commented Sep 11, 2020

I am using Ubuntu 20 in WSL2. Thanks for porting this very useful tool!

Small detail: I noticed that after installing it and sourcing .bashrc, the initial coloring of the user name, host and the rest of the previous prompt is not colored anymore. That's a very minor issue, but if somebody knows how to fix it, thanks in advance :)

I have a fairly ordinary prompt with Ubuntu.

david@Crunchmaster:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$

Not seeing color might be as intended, since the README suggests

PROMPT_COMMAND='__posh_git_ps1 "\u@\h:\w " "\\\$ ";'$PROMPT_COMMAND

which doesn't have the color codes. Perhaps you may want to do something like this:

PROMPT_COMMAND='__posh_git_ps1 "\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w " "\[\033[00m\]\$"'

@bgolinvaux
Copy link

image

It works fine! Thank you very much, not only for giving me the solution, but to allow me to understand how color display works! 😊

This tool makes my daily tasks much more easier : I am an anxious guy and always scared of working on the wrong branch, or forgetting to push my changes... :)

@ptasz3k
Copy link

ptasz3k commented Apr 19, 2022

I've solved slow working in WSL2 on mounted windows filesystems by exiting early when $PWD starts with /mnt. That way I can use it in WSL2 bash on native linux fs and do not wait forever if i need to check something on windows fs from bash.

I can create PR with some kind of env variable (POSHGIT_EXCLUDE?) if anyone is interested.

@jonathanbass
Copy link

I have no need currently. I ended up re-cloning the repos directly into the WSL2 filesystem and stopped using anything on Windows mount. That performed perfectly for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants