Terminal often becomes sluggish #11083

Closed
opened 2026-01-31 02:38:11 +00:00 by claunia · 6 comments
Owner

Originally created by @mehgcap on GitHub (Oct 20, 2020).

The problem is that Terminal becomes very sluggish. There is a delay of (I'm estimating) three to five seconds between any keypress and Terminal responding. This delay is present even if the keys are a local command, such as alt-f4 or ctrl-tab, so the issue isn't a laggy SSH connection or something similar.

The problem doesn't happen immediately. It can take anywhere from minutes to hours to begin, with Terminal working perfectly until, suddenly, the lag starts. I thought it might be screen reader-related at first, as something similar can happen with Firefox and NVDA, but that's not the case. I've quit NVDA and started Narrator after the lag began, and Narrator had the same delayed responses that NVDA did while Terminal was in focus. Switching away from Terminal while the problem is present causes all lag to disappear from the computer, while returning to Terminal brings the lag back.

Environment

Windows build number: Version 2004 (OS Build 19041.572)
Windows Terminal version (if applicable): 1.3.2651.0


Any other software?
NVDA 2020.3 (public release), Narrator

Steps to reproduce

I cannot reliably reproduce this problem, but it has happened three times today alone. The best I can do is say it happens when I have two tabs open, both with SSH sessions into remote servers over a work VPN.

Expected behavior

Normal behavior from Terminal, with immediate responses for local commands, and the usual minor delays for commands given to remote servers.

Actual behavior

As described above, Terminal becomes unusably slow and unresponsive, no matter if a command is a local keystroke or a string submitted to a remote server. Closing and re-opening Terminal returns things to normal, for a while. However, I can't keep using Terminal for work, because it has proven too unreliable for now.

Originally created by @mehgcap on GitHub (Oct 20, 2020). The problem is that Terminal becomes very sluggish. There is a delay of (I'm estimating) three to five seconds between any keypress and Terminal responding. This delay is present even if the keys are a local command, such as alt-f4 or ctrl-tab, so the issue isn't a laggy SSH connection or something similar. The problem doesn't happen immediately. It can take anywhere from minutes to hours to begin, with Terminal working perfectly until, suddenly, the lag starts. I thought it might be screen reader-related at first, as something similar can happen with Firefox and NVDA, but that's not the case. I've quit NVDA and started Narrator after the lag began, and Narrator had the same delayed responses that NVDA did while Terminal was in focus. Switching away from Terminal while the problem is present causes all lag to disappear from the computer, while returning to Terminal brings the lag back. # Environment ```none Windows build number: Version 2004 (OS Build 19041.572) Windows Terminal version (if applicable): 1.3.2651.0 Any other software? NVDA 2020.3 (public release), Narrator ``` # Steps to reproduce I cannot reliably reproduce this problem, but it has happened three times today alone. The best I can do is say it happens when I have two tabs open, both with SSH sessions into remote servers over a work VPN. # Expected behavior Normal behavior from Terminal, with immediate responses for local commands, and the usual minor delays for commands given to remote servers. # Actual behavior As described above, Terminal becomes unusably slow and unresponsive, no matter if a command is a local keystroke or a string submitted to a remote server. Closing and re-opening Terminal returns things to normal, for a while. However, I can't keep using Terminal for work, because it has proven too unreliable for now.
claunia added the Resolution-Duplicate label 2026-01-31 02:38:11 +00:00
Author
Owner

@alexandermalfait commented on GitHub (Oct 21, 2020):

I see major slowdowns in Windows Terminal when it has been open for a few days.
I have a bunch of tabs for different WSL distros/Powershell that I mostly keep open indefinitely.
After a few days, switching/opening tabs will become very slow, say ~1500ms to switch to the next tab.

Closing Windows Terminal and restarting will fix the issue.

Maybe I could make a thread dump (like java's jstack) during tab switch so the WT team can debug?

@alexandermalfait commented on GitHub (Oct 21, 2020): I see major slowdowns in Windows Terminal when it has been open for a few days. I have a bunch of tabs for different WSL distros/Powershell that I mostly keep open indefinitely. After a few days, switching/opening tabs will become very slow, say ~1500ms to switch to the next tab. Closing Windows Terminal and restarting will fix the issue. Maybe I could make a thread dump (like java's `jstack`) during tab switch so the WT team can debug?
Author
Owner

@mehgcap commented on GitHub (Oct 21, 2020):

In my case, I see the problem after as little as an hour of use, though it can sometimes take a few days. It also isn't just switching tabs, but any keyboard interaction at all.

@mehgcap commented on GitHub (Oct 21, 2020): In my case, I see the problem after as little as an hour of use, though it can sometimes take a few days. It also isn't just switching tabs, but any keyboard interaction at all.
Author
Owner

@Don-Vito commented on GitHub (Oct 21, 2020):

@zadjii-msft - I doubt it is a root cause, but noticed the following:

  • TerminalPage::_SplitPane calls _RegisterTerminalEvents on the focused tab
  • _RegisterTerminalEvents subscribes on PropertyChanged, etc of this tab
  • There is no revoker on this subscription
@Don-Vito commented on GitHub (Oct 21, 2020): @zadjii-msft - I doubt it is a root cause, but noticed the following: * TerminalPage::_SplitPane calls _RegisterTerminalEvents on the focused tab * _RegisterTerminalEvents subscribes on PropertyChanged, etc of this tab * There is no revoker on this subscription
Author
Owner

@DHowett commented on GitHub (Oct 23, 2020):

@alexandermalfait A dump would be excellent. You can capture one using Task Manager by right-clicking on WindowsTerminal.exe in the Details tab.

@mehgcap would you mind doing the same thing?

@DHowett commented on GitHub (Oct 23, 2020): @alexandermalfait A dump would be excellent. You can capture one using Task Manager by right-clicking on WindowsTerminal.exe in the _Details_ tab. @mehgcap would you mind doing the same thing?
Author
Owner

@DHowett commented on GitHub (Oct 23, 2020):

Consolidating - /dup #7710

Please move your dumps over there, or e-mail them to the address on my GitHub profile.

@DHowett commented on GitHub (Oct 23, 2020): Consolidating - /dup #7710 Please move your dumps over there, or e-mail them to the address on my GitHub profile.
Author
Owner

@ghost commented on GitHub (Oct 23, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Oct 23, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11083