Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retro Terminal Effect really slow in VM #4271

Closed
htmsousa opened this issue Jan 16, 2020 · 9 comments
Closed

Retro Terminal Effect really slow in VM #4271

htmsousa opened this issue Jan 16, 2020 · 9 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@htmsousa
Copy link

htmsousa commented Jan 16, 2020

Environment

Windows build number: [Version 10.0.19041.21]
Windows Terminal version (if applicable): 0.8.10091.0

Any other software? Running Windows Insider Preview Build within a virtual machine (4 cores at 4.20GHz, 16Gb RAM) on Hyper-V

Steps to reproduce

Activate flag "experimental.retroTerminalEffect":true

Expected behavior

Retro Terminal Effect is applied

Actual behavior

Retro Terminal Effect is indeed applied, but any terminal (powershell, debian, etc) with that flag activated becomes really slow (even just typing). Looking at task manager while typing some command, the CPU goes to near 100% usage on all 4 cores.
Setting the flag to false makes everything to work as usual.
Could it be caused by the fact it is running within a virtual machine? Or maybe because Hyper-V doesn't allow to use Physical GPU in the VM and it has to rely on CPU only to do the rendering?
The main system has the latest Windows Release Build, not the Insider Preview Build and I can't test the terminal outside the VM.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 16, 2020
@DHowett-MSFT
Copy link
Contributor

If you're running on CPU rendering, this is expected. I don't know if that's the case for a VM.

The main system has the latest Windows Release Build, not the Insider Preview Build and I can't test the terminal outside the VM.

The latest windows release build is 1903 or 1909, which does support Terminal.

@htmsousa
Copy link
Author

The latest windows release build is 1903 or 1909, which does support Terminal.

My bad.. didn't realise it was already supported by latest release. I tested in the main SO which has the GPU available and terminal windows are not slow when the retro terminal effect is active.

If you're running on CPU rendering, this is expected. I don't know if that's the case for a VM.

Fair point. Maybe there should be a note somewhere saying that if GPU is not available (which is very unlikely, apart usage within VMs), this is pretty much "useless".

@htmsousa htmsousa changed the title Retro Terminal Effect really slow Retro Terminal Effect really slow in VM Jan 17, 2020
@jantari
Copy link
Contributor

jantari commented Jan 26, 2020

I don't think a note is needed.

Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.

@Wartoz
Copy link

Wartoz commented Dec 19, 2020

this option eats a lot of GPU resources 😥

@teaalltr
Copy link

teaalltr commented Mar 1, 2021

Still present in Terminal version 1.5.10411.0

@zadjii-msft
Copy link
Member

@Piruzzolo Yep. As noted above:

Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.

@teaalltr
Copy link

teaalltr commented Mar 1, 2021

@Piruzzolo Yep. As noted above:

Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.

Yep, I'm now in GPU rendering and it's slow too. I think this shader is the problem. It may be simplified/optimized in some way

@zadjii-msft
Copy link
Member

Yep, that is the shader responsible for retro effects. We'd be happy to review any PRs to help optimize the effect if you can find something 😄

Note that the biggest cause of slowdown while using shaders is the fact that we can't use differential drawing while shaders are enabled. Differential drawing lets us only update the parts of the screen that have changed from one frame to the next, and is a massive perf improvement for the Terminal. #7147 is the closest thing we have to tracking "re-enable differential drawing when pixel shaders are enabled".

@teaalltr
Copy link

teaalltr commented Mar 1, 2021

Maybe it would be easier of we don't use shaders for this effect and use a CRT-like font and a proper background, instead. This retro effect is so common that It would make sense to someway hardcode it. Or maybe precompute the visual rendering per-character and show the bitmap as the user types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

6 participants