Terminal input is slow
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
Hi,
Thanks for Zed. It's getting better and better every weeks.
I adopted Zed the day it was available for Linux. I already use alacritty as my terminal, it's super fast. Ever since, typing in Zed embedded terminal is slow. Sometime, it's snappy. But most of the time, it stutters.
Environment
Zed: v0.153.6 (Zed)
OS: Linux Wayland debian 12
Memory: 15.3 GiB
Architecture: x86_64
GPU: Intel(R) UHD Graphics 620 (WHL GT2) || Intel open-source Mesa driver || Mesa 22.3.6
If applicable, add mockups / screenshots to help explain present your vision of the feature
I don't know how to investigate this. I'm open to help.
If applicable, attach your Zed.log file to this issue.
I did not found anything special regarding this in Zed log.
Regards, Étienne
This bothers me too (on macOS). It's not that the terminal is slow, per se—it doesn't visibly lag when writing lots of output. The problem seems to be the keystroke latency, especially when editing the command line.
For example, if you simply hold down the spacebar, you can see the cursor stuttering and juddering, slowing down and speeding up from time to time as it struggles to keep up. It's annoying enough that I now switch to a dedicated terminal app when doing anything non-trivial in the Zed terminal.
Would love to see a screen video of this, as I can't seem to reproduce it on my end on macOS (haven't tested on Linux yet).
@JosephTLyons , thanks for your attention.
Here zed is struggling:
While alacritty is fine enough (inside Zellij):
I noticed the same (Linux, 0.156.0), but mostly in nvim inside zed
Same issue especially when using helix in terminal.
Same issue especially when using msys2 and powershell on windows in terminal.
Similar issue using remote ssh with zed, I believe it's related to network performance. The character input in terminal has extremely high latency on poor network connections (coffee shop, hotel, etc). It sometimes becomes unbearably slow to type with characters appearing a few seconds after input. The issue isn't present with a strong/fast internet connection.. Seems for ssh, the terminal rendering each character is network dependent (send character -> receive confirmation -> render?)
I can see the same input lag on macOS as well, when I open up Neovim (even if I start it in --clean mode) in the Zed terminal. It's a bit annoying, as I'm using Neovim to resolve merge conflicts, but the terminal gets so slow that I have to use something else.
I noticed that when I open a remote session with Zed and launch a terminal and Neovim on the host, I cannot detect the stuttering that occurs in a local session.
Okay, one more thing, I have a hunch that it might be related somehow to how much I zoomed in on the terminal. I managed to reproduce it quite deterministically by zooming in and out in the terminal and stepping on j and k in Neovim. As I zoom out, after a certain time, the scrolling of the buffer freezes until I stop pressing the key again.
https://github.com/user-attachments/assets/0a0c0f28-a7e3-4956-a70c-93e5441f158e
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
Still reproducible:
https://github.com/user-attachments/assets/b6b43f49-d397-493b-83f4-73afc4ee5772
In all three modes (terminal, vim, and nvim) I just hold down i. In nvim, nothing happens until I release it (hence the jump from one i to many is).
I can reproduce by having a large terminal window and small text, but even a window of half the screen with default font size triggers this. I didn't start nvim with --clean in the video, but it makes no difference.
I too experience some slowness, especially when running magit.
i'm observing slowness when paging through large diffs.
video here where i hold down 'j' with a fast key repeat rate, it simply stops rendering until i let go and start tapping. ghostty pages fine on the same diff.
https://stuff.schpet.com/uploads/q2CeI8Lj3ZARNjRR0GZNX/Screenshot%202025-04-10%20at%2010.21.05.mp4
(ideally i'd be able to see a diff against arbitrary refs within zed itself so i wouldn't need to dip in to the terminal for this but that's a separate issue)
I have a weird case where my nvim in the Zed terminal slows down dramatically (practically unusable) when in full screen (workspace::ToggleZoom), but the issue resolves when switched back to normal mode. Might be related. Running on latest macOS, M1.
My terminal input slows down drastically when the terminal is zoomed in and the font is made smaller. Terminal is snappy again when font is zoomed past certain point.
same here. it's smooth when I use nvim, until i zoom in. When I keep press down j or k it freezes
https://github.com/user-attachments/assets/4222b015-cdfc-45bd-9093-a5963bb96ede
Another repro: When there is diff in the terminal history generated by delta the input gets extremely slow.
I have discovered another way to recreate this very consistently: workspace::ToggleZoom and hackernews-TUI.
If one starts a terminal and runs hackernews_tui, it scrolls just fine for each keypress or holding. But as soon as you workspace::ToggleZoom it gets very sluggish. In some cases, it doesn't even send the keystrokes to the tui until the key is let up. workspace::ToggleZoom back to small, and it works fine again.
https://github.com/user-attachments/assets/bcbb927f-a8f9-43e5-a706-963042b5f1f2
it happens to me only when I use vim inside the builtin terminal, very strange...
Unfortunately, despite the latest change, this still isn't fixed (vim in expanded terminal).
@metsis can you please share more details about your system and setup, and what is still slow?
Unfortunately, despite the latest change, this still isn't fixed (vim in expanded terminal).
Were you on Zed 0.195.x ? Just got Zed 0.195.2, and I can confirm terminal is now very fast (was slow when using vim previously).
Unfortunately, despite the latest change, this still isn't fixed (vim in expanded terminal).
Were you on Zed 0.195.x ? Just got Zed 0.195.2, and I can confirm terminal is now very fast (was slow when using vim previously).
Oh yes - my bad, thought I was running the latest version. Now I can confirm everything's as fast as I expect it to be - thank you for noting it and thanks to @ConradIrwin & al for fixing this. :)
All credit to @alisinabh :D