-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Delay ~1sec after each key press in insert mode on WSL2 #5083
Comments
Does this only happen using WSL or also when you run helix natively on Windows?
|
@CptPotato Helix does not perform IO on every keypress. Instead only once when a file is loaded or when I would suspect that either locks or timers misbehave on wsl2 somehow or behave different in a way I had not considered. This will likely be challenging to debug. @egorovpavel it would help point us in the right direction if you could tell us whether this bug also occurs on windows natively |
@pascalkuthe on windows 10 it works with no issues as well. Will try to install and test on fresh WSL instance to isolate better from stuff installed on my current working WSL instance. |
@pascalkuthe on fresh WSL instance with ubuntu I have the same issue as described above. Let me know if there is anything I can try to debug this issue? |
Thanks for performing those tests. Sadly I can't debug this myself as I can't run WSL2 inside a windows VM easily (that would be nested virtualization) and I don't have windows installed anywhere. Therefore I am going to need some help with debugging this. I created a fork which contains a bunch of extra logging: https://github.com/pascalkuthe/helix/tree/git_gutter_test |
@pascalkuthe here are the results(I entered into insert mode then typed
|
Thanks for reporting back on this 🙏 This issue is really difficult for me to debug. From these logs it actually looks like you are waiting more like 10-20s :O I really didn't suspect a problem in this part so I only added some sparse logging there. I push a new commit that adds a bunch more logs here basically anytime someting happens. It would be nice if you could test again @egorovpavel so I could be sure this is really the timeout or if I missed something else |
@pascalkuthe this is super weird... but after running Anyway thank you and sorry for wasting your time. |
Summary
After update to 22.12, helix is no longer usable for editing files (within git repository). Every change or keypress takes about a second (many times over second). This most notable in insert mode, but also happens in normal mode when I change the content.
Hint: First noticed after this PR have been merged to master, so it somehow related to a git gutter implementation. However, the version compiled from this commit works. Also tested on mac and it works with no issues.
Reproduction Steps
I tried this:
In example below I hiting

Enter
4 times in a row with no delay and then 4 timesbackspace
.I expected this to happen: see changes immediately as I type
Instead, this happened: see changes after delay
Helix log
~/.cache/helix/helix.log
Platform
WSL2 / Ubuntu 20.04 LTS / Windows 10
Terminal Emulator
wezterm 20221119-145034-49b9839f, Windows-Terminal Version: 1.15.2874.0
Helix Version
helix 22.12 (96ff64a)
The text was updated successfully, but these errors were encountered: