Open clbarnes opened 5 years ago
yeah the delay is quite noticable when I use Windows Subsystem Linux Not much so on macOS
Are you using WSL 1 or WSL 2 preview? WSL 1 has serious issues with file IO speed, among other things, so basically anything involving git is very slow.
Wsl 2. Actually, on wsl 1, its very much bearable.
On Mon, Aug 12, 2019 at 5:55 PM Chris Barnes notifications@github.com wrote:
Are you using WSL 1 or WSL 2 preview? WSL 1 has serious issues with file IO speed, among other things, so basically anything involving git is very slow.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/justjanne/powerline-go/issues/129?email_source=notifications&email_token=AAEZETXXAOFPTKFO2JNQMUDQEE6RJA5CNFSM4HIPUU7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4CFWRQ#issuecomment-520379206, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEZETUC65QGB4M5SLOGR2DQEE6RJANCNFSM4HIPUU7A .
hmm, it seems it's issue with WSL
the issue happens when i'm on /mnt
Late to the party here but found that git stash list
was resulting in ~250ms delay for powerline while in a git repo. Using WSL1 on 1909 on Ubuntu 18.04 LTS. I have a patch applied to check if any stashes exist before pulling the list which avoids that issue.
Here are my timings
I will get a pull request up sometime later for the git stash delay.
The latency should be improved quite a bit now, as I changed the way git stashes and jobs are determined. If you could please test with the latest version, that’d be great :)
Performance is much improved. It also doesn't regress with stashes 👍
And thanks to the parallel segment PR, performance should now be even better :)
It is significantly faster for me.
Mercurial adds 250ms of latency for me, but I don't see a clean way of fixing that outside of mercurial itself
Very pronounced lag in WSL2 Ubuntu, unusable. Quite noticeable in PowerShell Core, but not too bad. Fine in Linux.
@ysiivan Are you using Windows or Linux directories in WSL2. There is a pretty considerable hit using the Windows side in WSL2.
For reference, this is how mine is configured: https://github.com/82phil/workstation/blob/main/wsl/home/.bash_additions#L7
@82phil Yes, using it on the windows directories in WSL2 is really bad. I'd be very happy with your times. However, even with your config, it is way worse.
Non windows folders
For comparison, I gave a quick try to a Rust built implementation. It was faster, though likely not doing all that this one does. Still not fast enough on WSL2 windows mounted folders.
@ysiivan Does this only happen in Git repos? My previous post was unintentionally misleading, those repos that I showed don't have much in them. If I use a decently sized project like Ruby on Rails I get your kind of numbers. Even using git status
shows a large difference in performance when in the Linux file system vs Windows.
WSL2 file performance in Windows directories is abysmal if your churning through a lot of files. Can you move your files over to the Linux file system in WSL2?
No progress? It seems a great choice to use git.exe
when under a Windows file system folder.
Out of interest, what latencies are other users seeing, for what arguments? You can find out (if you have
time
installed) by changing your_update_ps1
function like this:I have powerline-go taking 100-200ms, with the command
powerline-go -colorize-hostname -condensed -cwd-mode plain -priority 'root,cwd-path,exit,user,host,ssh,perms,git-branch,jobs,git-status' -error $?
e.g. when
cd
ing into a directory with no python environment:And when
cd
ing into a directory with a python environment:It's not much in the grand scheme of things, but it's a bit of a pain given it's added to every command run! I was just wondering whether my experience was typical.