wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
18.19k stars 813 forks source link

Slow performance with large redraws #4293

Closed expipiplus1 closed 1 year ago

expipiplus1 commented 1 year ago

Is your feature request related to a problem? Please describe.

I've noticed that WezTerm is noticeably slower when updating a large number of characters compared to Alacritty or Kitty. An easy tool to with which to reproduce this is cmatrix -u0, it displays a whole screen of moving characters (-u0 makes it not wait time to update, but even with higher frame times WezTerm struggles to keep up with large screen sizes).

This is a video of WezTerm on the left and Alacritty on the right, I've used a humongous size for each to make the difference easy to see in the video, but even at more human sizes it's possible to discern. Wezterm-Alacritty-cmatrix-u0.webm

(I first noticed this when scrolling in Vim with a smooth scrolling plugin, the buffer refresh was much more sluggish (and hence less smooth) than in the other mentioned terminal emulators. FWIW, I don't think this is quite captured by the existing vim/scrolling performance issues, as they all seem to feature some multiplexer/remote aspect, and if this scrolling performance is the same symptom as the cmatrix program exhibits, then it's not vim-specific.)

This is most prominent with a large terminal size, however even with a modest size (280x80) the scrolling in vim is noticeably more laggy.

It's fine if this is this performance gap is the price to pay for the way better font rendering in WezTerm compared to A or K" (Certainly a worthwhile tradeoff!), but it would be good to get to the bottom of this if it's actually unexpected :)

mcopik commented 1 year ago

I'm having a similar issue - I first noticed that when working with nvim in WezTerm, it starts to experience visible lagging and slow down after 30-60 minutes of work. When running with cmatrix, it's way slower than the standard GNOME terminal.

wez commented 1 year ago

This is already tracked by several other issues, so I'm closing this out. See https://github.com/wez/wezterm/labels/render-latency

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.