wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Performance gap between Wezterm and Windows Terminal on Windows 11 VM

Open tamlok opened this issue 2 years ago • 3 comments

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20231203-124028-e3cd2e93

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

I am doing daily dev work via remote desktop to an azure VM on Win11. When using NVIM within Wezterm, I can notice poor rendering perf (such as when moving cursor down repeatedly). But in Windows Terminal, the rendering feels as good as native desktop in NVIM.

How can I help to provide more info to improve the perf and minimize the gap?

To Reproduce

Create a Win11 VM and remote desktop to it and then launch NVIM and keep pressing J while opening a medium size file.

Configuration

front_end = "WebGpu",

Expected Behavior

Should behave with the same perf as Windows Terminal.

Logs

Debug Overlay wezterm version: 20231203-124028-e3cd2e93 x86_64-pc-windows-msvc Window Environment: Windows WebGPU: name=Microsoft Basic Render Driver, device_type=Cpu, backend=Dx12, vendor=5140, device=140

Anything else?

No response

tamlok avatar Dec 19 '23 15:12 tamlok

It looks like you're using Cpu rendering, so the performance will not be good. For remote work, I recommend using either ssh or wezterm's multiplexing feature so that your local machine can render the gui.

wez avatar Dec 22 '23 05:12 wez

Is there any command to check Windows Terminal's rendering type? If both of them are CPU rendering, then there must be something different elsewhere?

I am developing GUI app so ssh is not the choice.

tamlok avatar Dec 22 '23 09:12 tamlok

Hi @wez , I read the docs about font_end and see this:

WezTerm will automatically select Software if it detects that it is being started in a Remote Desktop environment on Windows.

So WezTerm will use Software if it is in a remote desktop session regardless of the config?

I did a recording comparing WezTerm with Windows Terminal. I type the chars wihtout any hesitation but WezTerm responses very slow and suddenly display the whole sentence I typed.

Hope it can help.

https://github.com/wez/wezterm/assets/5763157/bc0c6c79-5337-431d-82de-f00d5de3859e

tamlok avatar Jun 11 '24 06:06 tamlok

You can check windows terminal rendering by going in Settings -> Rendering. And you can check available WebGpu in wezterm by going into logs, (ctrl-shift-L) and using print(wezterm.gui.enumerate_gpus())

I had same problem with performance , but on local machine. The problem was that wezterm choose Vulkan instead of Dx12 by default, so i had to use lua code to force it to use backend=Dx12, device_type=DiscreteGpu, and performance became just the same as windows terminal.

DnBaal avatar May 11 '25 08:05 DnBaal

Hi @DnBaal ,

Thanks for your help!

From the remote desktop, it seems that there is only CPU renderring:

wezterm version: 20241129-152148-4906789a x86_64-pc-windows-msvc
Window Environment: Windows
Lua Version: Lua 5.4
WebGPU: name=Microsoft Basic Render Driver, device_type=Cpu, backend=Dx12, driver=10.0.26100.3624, vendor=5140, device=140
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
> print(wezterm.gui.enumerate_gpus())
21:34:22.761 INFO logging > lua: [
    {
        "backend": "Dx12",
        "device": 140,
        "device_type": "Cpu",
        "driver": "10.0.26100.3624",
        "name": "Microsoft Basic Render Driver",
        "vendor": 5140,
    },
]

For Windows Terminal:

Image

tamlok avatar May 12 '25 13:05 tamlok