zsh-users / zsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.
github.com/zsh-users/zsh-syntax-highlighting
BSD 3-Clause "New" or "Revised" License
19.55k stars 1.32k forks source link

Slow when typing name of the programs in WSL2 #899

Closed KingRayCao closed 1 year ago

KingRayCao commented 1 year ago

I'm using ubuntu 22.04.1 LTS via WSL2, and I find that there is a obvious lag when I try to type the name of the programs(e.g. ls, date, etc), but when I'm typing the arguments and flags ,everything goes fine. After I turned the plugin off, the problem was solved. Beside the plugin, I've also installed auto suggestion.

Crazy-Ginger commented 1 year ago

Encountered a similar issue. All typing was really laggy and was printing to the terminal in batches of 4 or so characters. I disabled the plugin and the lag was gone.

WSL2 Windows Terminal 1.15.2713.0 Debian 11 5.15.68.1-microsoft-standard-WSL2 zsh 5.8

KingRayCao commented 1 year ago

Are you sure ALL the typing was slow? When I type in the arguments and flags, all things went fine. So I guess some problem encountered when the highlighting program checked whether some program is in the path. WSL2 Windows Terminal 1.15.2713.0 Ubuntu 22.04.1 LTS zsh 5.8.1

Crazy-Ginger commented 1 year ago

Yes it was (and does when re-enabled) no matter what I type

danielshahaf commented 1 year ago
  1. Try zsh 5.9.
  2. I don't know that any maintainer has WSL, so, y'all may need to help investigate. Does it reproduce in zsh -f? Do make check and make perf work? Does zsh/zprof show anything (don't forget to zprof -c before starting the timed section)? Can you try a different terminal?
danielshahaf commented 1 year ago

Looks like a duplicate of #790, so closing. Feel free to reopen if there's a distinction between the two issues.