Skip to content
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

Code-server terminal lag #7085

Closed
xqdoo00o opened this issue Aug 18, 2022 · 3 comments
Closed

Code-server terminal lag #7085

xqdoo00o opened this issue Aug 18, 2022 · 3 comments
Assignees
Labels
code-server Issues on the VS Code Server.

Comments

@xqdoo00o
Copy link

xqdoo00o commented Aug 18, 2022

I'm using the code-server 1.70.2 in wsl.

Sometimes the terminal lag after I type in command, I tried to debug in chrome, and find that if command no lag, the websocket shows upload binary message immediately. If command lag, after a few ms(up to 1s) the websocket shows the messages , and the terminal shows which I typed in at the same time.

image

I use code-server in local wsl, so the network factor could be excluded.
Would it help if put websocket code in webworker (Found this old bug)? or other code causeing this random terminal & websocket lag?

@github-actions github-actions bot added the wsl Issue in vscode-remote WSL label Aug 18, 2022
@xqdoo00o xqdoo00o changed the title Terminal lag coder-server terminal lag Aug 19, 2022
@xqdoo00o xqdoo00o changed the title coder-server terminal lag code-server terminal lag Aug 19, 2022
@xqdoo00o xqdoo00o changed the title code-server terminal lag Code-server terminal lag Aug 19, 2022
@bamurtaugh bamurtaugh added code-server Issues on the VS Code Server. and removed wsl Issue in vscode-remote WSL labels Aug 22, 2022
@connor4312
Copy link
Member

I think to debug this we should make some "latency measurement" commands that would print diagnostic info that users could share...

@SuhasHebbar
Copy link

The now removed code-server serve-local works way better in this scenario for running code-server locally in WSL or a container.

I am guessing the latency is unavoidable since code tunnel is not P2P and directs all traffic through microsoft's tunnel servers despite running the server locally. VSCode's terminal tries to handle the lag by optimistically displaying keypresses before the server response but it doesn't help much and doesn't work very well with vim keybindings.

@connor4312
Copy link
Member

In microsoft/vscode#182653 we now show the latency of slow connections

image

The request for serve-local is tracked in microsoft/vscode#168492

@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-server Issues on the VS Code Server.
Projects
None yet
Development

No branches or pull requests

4 participants