Background tabs shouldn't actually render their contents #7167

Closed
opened 2026-01-31 00:56:52 +00:00 by claunia · 5 comments
Owner

Originally created by @zadjii-msft on GitHub (Mar 27, 2020).

Originally assigned to: @miniksa on GitHub.

I noticed that while running the tests in the Terminal that we always spend CPU/GPU time rendering a TermControl, even if the hosting tab is in the background. I'm not 100% certain about this, but it sure seemed like this was happening on my slaptop.

IIRC conhost does some logic to no-op rendering when it's minimized - TermControl should probably do something similar, including for when the tab isn't visible.

Basic Repro

  1. Open two tabs
  2. In the first one, run the unit tests, or anything else that'll generate a ton of output.
  3. Switch to the other tab, and do nothing in it.

Expected

The GPU usage for the Terminal should be at the baseline usage for a terminal that's not doing anything.

Actual

GPU seemed to be getting the workout it normally does processing boatloads of output

Originally created by @zadjii-msft on GitHub (Mar 27, 2020). Originally assigned to: @miniksa on GitHub. I noticed that while running the tests in the Terminal that we always spend CPU/GPU time rendering a TermControl, even if the hosting tab is in the background. I'm not 100% certain about this, but it sure seemed like this was happening on my slaptop. IIRC conhost does some logic to no-op rendering when it's minimized - `TermControl` should probably do something similar, including for when the tab isn't visible. ### Basic Repro 1. Open two tabs 2. In the first one, run the unit tests, or anything else that'll generate a ton of output. 3. Switch to the other tab, and do nothing in it. ### Expected The GPU usage for the Terminal should be at the baseline usage for a terminal that's _not_ doing anything. ### Actual GPU seemed to be getting the workout it normally does processing boatloads of output
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 27, 2020):

I believe this is related to #1989

@DHowett-MSFT commented on GitHub (Mar 27, 2020): I believe this is related to #1989
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 27, 2020):

/dup #1989

@DHowett-MSFT commented on GitHub (Mar 27, 2020): /dup #1989
Author
Owner

@ghost commented on GitHub (Mar 27, 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 (Mar 27, 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!
Author
Owner

@zadjii-msft commented on GitHub (Mar 27, 2020):

See, I don't think so. That one is more specifically the whole window, while this one's more specific inactive tabs. I'm fine changing the other one to call out this case better though

@zadjii-msft commented on GitHub (Mar 27, 2020): See, I don't think so. That one is more specifically the _whole window_, while this one's more specific _inactive_ tabs. I'm fine changing the other one to call out this case better though
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 27, 2020):

I dunno, the title includes "control has been hidden". I think that a solution to one helps the other.

@DHowett-MSFT commented on GitHub (Mar 27, 2020): I dunno, the title includes "control has been hidden". I think that a solution to one helps the other.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7167