-
Notifications
You must be signed in to change notification settings - Fork 947
Slow command execution #718
Comments
Anyone can help? |
Hey @lukaszog - sorry for the delayed response! And wow, you're right, that's painfully slow. Looking at the list of segments you are using, I don't see anything that should cause that - those are all fairly simple segments. I don't have any direct experience using P9k on WSL, so I wonder if there is something specific to WSL that might be happening. Pinging @jldeen in case she has any insight. Can you tell me what version of P9k you are using and how you installed it? |
I have the same issue on my machine. The symptoms are the same as the ones described above, but the VCS segment is particularly bad: Building the prompt takes about 2.5 seconds whenever I am in a git repo. Note that the reop doesn't seem to matter much, this time is the same in a newly initialized repo and a populated one, so it's probably something else. My device is a Surface Pro 3 and I am running the current Windows 10 release (1709, Build 16299.192) with CMDer/ConEmu as my terminal emulator. However, the issue also appears when using the Windows built-in terminal. Here is my .zshrc
|
@ThaneDE @lukaszog I've played with this a bit and I too can replicate the slowness. What's weird is I can replicate this on both WSL and MacOS. I'm wondering if it's something other than a WSL issue. I seem to have the issue with the VCS segment enabled. While the below is not a gif, you can see the spacing between where I enter a new line without cd'ing into a Git branch (using VCS) and then when I do. @bhilburn Are you able to work with me offline at dissecting this? I'm wondering if it's something in my dotfiles/install.sh that needs to be tweaked. I can then update it for WSL and MacOS w/ P9K. |
@ThaneDE - Wow! Thanks so much for the in-depth investigation! This is really helpful. Also, 2.5 seconds is really bad. I've never seen it take that long. Also, the results your experiment are really interesting to me. Can you post a table of the software in use on the two systems? What version of Windows, ZSH, git, and P9k? @lukaszog @jldeen - It looks like we have two issues, here. Based on @ThaneDE's experiment, one seems to be somehow linked to versioning in some Windows software (not necessarily Windows itself). Another is just the VCS segment being a pain. We are already working on speeding up the VCS segment (#732) - note that the Once we get more details from @ThaneDE on his versions, above, we can look into that further, too. Thanks, everyone, for your time, feedback, and input in this! It's a really important issue, and your help in tracking down the issues and getting them fixed is superb =) |
@bhilburn Sure thing! Both systems are running the most recent version of Windows 10 (1709) and the corresponding WSL version (Ubuntu 16.04 wizh zsh 5.1.1). P9k is at v.0.6.4 on both systems. The only difference with the VM was the Windows Version - 1607 instead of 1709. The slow build also happens regardless of terminal/theme. I also don't have any other software interfering with the WSL installed. Here is a full list of all installed packages: https://pastebin.com/N27D34mw I should mention that I tested some other ZSH themes (specifically Agnoster), and while there is some delay there too, it's not quite as bad as in P9k. My best guess is that Microsoft recently (read: last few releases) changed something in the WSL compatibility layer that slows down the vcs module (perhaps something I/O-related?). But that's just a guess. Also, the vcs prompt builds really fast when I run Linux on the same machine, so it's definitely something Windows-related. |
Anyone make progress in this topic? |
I have experienced this issue as well. My understanding is that I/O in WSL is known to be slow and therefore git is slow. This issue on the WSL repo highlights the problem with git which effects the execution time of the vcs segment: microsoft/WSL#981. There is also a script which some users provided giving a temporary fix for git (use the windows executable). This is the main issue descripting the I/O issues: microsoft/WSL#873. I've been looking for a fix for this for awhile, but it may be that this is something that needs to be fixed in WSL. |
@lukaszog, @williamstrong, et al. - We are actually making some progress, here. The slowness does appear to be coming from a number of sources, most of which we don't have direct control over. We can, however, try to work around them in some cases. I am about to tag a v0.6.5 release, and almost immediately following that, we are going to go to v0.7.0 (#863). The v0.7.0 codebase is completely re-written, thanks to a tremendous effort from @onaforeignshore with support from @dritter, and will allow us to use different "generators" for the segments, including asynchronous generators. This should help us keep the prompt speedy, even if something in a particular segment takes a long time to process & return a value. |
Fantastic! I'm looking forward to this. Can we expect v0.7.0 today? |
@williamstrong - v0.6.5 will get tagged today (hopefully!). v0.7.0 will be shortly after (in the next couple of weeks). I'll update this thread as soon as we go :) |
Hey all - v0.6.5 was tagged back in July, and v0.6.6 was tagged more recently with even more speed-ups. The v0.7.0 codebase currently exists on the I am going to close this issue and try to move all conversations relative to speed / performance to #732. @lukaszog, @williamstrong @ThaneDE - If you're interested in continuing to contribute to this effort, please try out |
Same issue. Unusabley laggy with stock config on the latest version. |
I'm having the same issue with the stock installation using oh-my-zsh on Ubuntu running under wsl. |
@dnetguru Is it also slow with Powerlevel10k? |
@romkatv I hadn't try powerlevel10k and I just did and the latency is barely noticeable now! |
Anyone make progress in this topic? |
Just came here because Powerlevel9k was so slow for me on macos. Instantly installed Powerlevel10k, and it's 10x faster. |
Hi,
I'm using Windows 10 with WSL VcxServer and Gnome Terminal. Yesterday I installed
oh my zsh
and fonts. Everything working good and fast, next I add powerlevel9k as a theme to my.zshrc
after this execution of commands has slowed down, the prompt is loading for a long time. Why? Can I fix it?My config
The text was updated successfully, but these errors were encountered: