Skip to content

Delay ~1sec after each key press in insert mode on WSL2 #5083

Closed
@egorovpavel

Description

@egorovpavel

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 times backspace.
asciicast

I expected this to happen: see changes immediately as I type

Instead, this happened: see changes after delay

Helix log

~/.cache/helix/helix.log
2022-12-08T14:55:45.441 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/signatureHelp","params":{"position":{"character":0,"line":0},"textDocument":{"uri":"file:///home/user/hxbug/index.js"}},"id":1}
2022-12-08T14:55:45.445 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":1,"result":null}
2022-12-08T14:55:45.445 helix_lsp::transport [INFO] <- null
2022-12-08T14:55:45.445 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:55:46.032 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-08T14:55:46.032 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:55:46.181 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":0},"start":{"character":0,"line":0}},"text":"\n"}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":1}}}
2022-12-08T14:55:46.183 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/hxbug/index.js","diagnostics":[]}}
2022-12-08T14:55:51.302 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:55:51.302 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:55:51.302 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/hxbug/index.js","diagnostics":[]}}
2022-12-08T14:55:51.302 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":1},"start":{"character":0,"line":1}},"text":"\n"}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":2}}}
2022-12-08T14:55:52.122 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:55:52.122 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:55:52.123 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":2},"start":{"character":0,"line":2}},"text":"\n"}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":3}}}
2022-12-08T14:55:57.642 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:55:57.642 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:55:57.643 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":3},"start":{"character":0,"line":3}},"text":"\n"}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":4}}}
2022-12-08T14:55:57.645 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/hxbug/index.js","diagnostics":[]}}
2022-12-08T14:56:00.122 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:56:00.123 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:56:00.124 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":4},"start":{"character":0,"line":3}},"text":""}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":5}}}
2022-12-08T14:56:00.153 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:56:00.153 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:56:00.154 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":3},"start":{"character":0,"line":2}},"text":""}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":6}}}
2022-12-08T14:56:04.123 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:56:04.123 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:56:04.123 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":2},"start":{"character":0,"line":1}},"text":""}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":7}}}
2022-12-08T14:56:05.053 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:56:05.053 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:56:05.053 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":1},"start":{"character":0,"line":0}},"text":""}],"textDocument":{"uri":"file:///home/user/hxbug/index.js","version":8}}}
2022-12-08T14:56:10.154 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/hxbug/index.js","diagnostics":[]}}
2022-12-08T14:56:10.154 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2022-12-08T14:56:10.154 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-08T14:56:10.155 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [], "uri": String("file:///home/user/hxbug/index.js")}) })))
2022-12-08T14:56:10.155 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/signatureHelp","params":{"position":{"character":0,"line":3},"textDocument":{"uri":"file:///home/user/hxbug/index.js"}},"id":2}
-12-08T14:56:10.155 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0

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)

Metadata

Metadata

Assignees

Labels

A-vcsArea: Version control system interactionC-bugCategory: This is a bugE-hardCall for participation: Experience needed to fix: Hard / a lotO-windowsOperating system: Windows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions