Open crides opened 8 months ago
I have the same issue.
The problem is much more pronounced if there is a lot of text in the pane. And sometimes the panes will keep dancing around even after I let go of them, and will only stop after I have detached then re-attached the domain.
actually, it doesn't take that much, mostly empty panes will struggle too.
here is a video showing off this behavior, it's a bit long. at the start you will notice resizing was extremely slow even for empty panes, then several seconds after I have let go, the panes started to dance around.
the experience is really bad, basically wezterm isn't a viable tmux replacement because of this.
https://github.com/user-attachments/assets/cf762eb9-06ee-41e0-bdb7-0e5beaafd959
I see now that there are actually 2 different problems here. One being that pane resizing is extremely slow. With some profiling I found out one hotspot is TermWindow::update_title_impl
. I believe it is called in response to MuxNotification::TabResized
, which is sent an extraordinary amount of times, clearly more than what is necessary.
The second being the panes jumping around. This is exacerbated by the first problem, but even after I commented out the call to update_title
and saw the CPU usage drop by a lot, this still happens. I haven't figured out this one yet.
I have noticed that the MuxNotification::TabResized
is sometimes sent repeated even after I have let go of the mouse button, and is correlated with the dancing panes.
I think there is a feedback loop in sync_with_pane_tree
Yes, so MuxNotification:TabResized
leads to the server sending a Pdu::TabResized
, which triggers a pane list resync in the client. And because resizing is slow, the pane resize is behind what the client thinks it would be. so the client thinks it was resized again, so it calls mux::tab::TabInner::resize
, and the whole thing starts over.
What Operating System(s) are you seeing this problem on?
Linux X11, macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240102-011725-2f7ca41a
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
To Reproduce
Configuration
no config
Expected Behavior
No response
Logs
Anything else?
mux with unix
https://github.com/wez/wezterm/assets/15631555/6544b25b-b26b-49a9-b80a-bb408bf70d51
mux with ssh. Slightly easier to see the effects, but I wanted to show issue 3 which didn't show up. Issue 3 is clearly visible on my work computer.
https://github.com/wez/wezterm/assets/15631555/ace74c15-6692-4d5d-a128-749db0c4359b