Live data from Hacker News

Typing inside of the default WSL terminal feels amazing (2018)

github.com

31–40 of 123 posts

Re: Typing inside of the default WSL terminal feels amazing (2018)

#31

I'm curious how alacritty compares to it. The alacritty devs basically consider another terminal app rendering faster than them to be a bug on their part ;-) But it does sound like it would be a good challenge.

> I'm curious how alacritty compares to it. The alacritty devs basically consider another terminal app rendering faster than them to be a bug on their part

Note: Alacritty prides itself on fast rendering speed, but not necessarily on low latency[0]. I'm a happy Alacritty/Linux user, but I'm not sure it would win on this benchmark.

[0]: https://news.ycombinator.com/item?id=18006751

Re: Typing inside of the default WSL terminal feels amazing (2018)

#32
post #22

Earlier quoted context omitted.

Note that this content is one year old. At that point, WSL was not a virtual machine, it was Linux syscall emulation in the NT kernel.

Does that mean it's faster or slower now?

Probably both on different tasks

Re: Typing inside of the default WSL terminal feels amazing (2018)

#33
post #23
post #22

Earlier quoted context omitted.

Does that mean it's faster or slower now?

I would be shocked if it were faster.

Depends on the operation in question. Direct syscalls should be faster, but there are some big differences between the NT and Linux kernels. You end up getting all the poor performance areas of BOTH. That, and HyperV has an extremely fast lightweight VM mode for particular hardware. For example, running containers on HyperV actually runs them with VM level isolation, a la Kata containers... and at competitive speeds.

An example of the worst of both worlds result is the filesystem. In the NT kernel, every filesystem call goes through a series of Filters: any program can provide filters for given file types. Filters can do anything, from antivirus programs scanning the file on access, to Notepad adding itself to the Context Menu as an "open with Notepad" item. This makes filesystem access - even metadata checks - very time expensive on Windows. On Linux, we keep file metadata in memory, which is memory expensive, but it makes certain filesystem operations very fast. The result of mapping one onto the other is a combined filesystem operation which is memory expensive AND slow.

So for example, on WSL 1 (mapped syscalls), using a git repo of any size is impossibly slow... on the order of 10 seconds to get a git status for a work project. But on WSL2, the same syscalls live entirely inside the VM and are almost native fast.

Re: Typing inside of the default WSL terminal feels amazing (2018)

#34
post #28
post #2

How I wish that I could use the new terminal app on the windows 10 build that is installed on my work Laptop.

Wow your work laptop is up to 10 already? We've started to plan our migration.

Windows 7.1 extend support ends on January 14, 2020. So is your org planning a very fast rollout or is it paying $$$ for Extended Security Updates?

Re: Typing inside of the default WSL terminal feels amazing (2018)

#35
post #9

The surprising thing here is that this is the Ubuntu terminal. Indeed, each keystroke goes through the input driver, to USER32, through the console code, to the terminal process in question. But then it goes through a virtual input device, across the VM boundary (which, on Windows is a VM exit plus an entry), through the Linux input driver, into dash (or whatever Ubuntu uses these days), and then all the way back out…

I think most of the latency between key press and rendering to screen is in the layout / drawing phase. Forwarding a few function calls is usually pretty fast, the text layout and rendering part is what is slow. Especially since many UI frameworks don't render individual characters; you may end up redrawing a full line or more for every keystroke. (I only have experience with macOS / Cocoa rendering, and I was surpri…

All of the actual work can easily happen in under a millisecond. What makes input to screen output slow is anything asynchronous - polling (on the input side, e.g. in the USB protocol itself - USB to PCI uses interrupts!) and waiting for the next frame on the output side. Let's say the console waits for vsync to render its next frame, then the compositor grabs it and renders it in the next frame. That is one frame of gratuitous latency.

Re: Typing inside of the default WSL terminal feels amazing (2018)

#36
Author of the GitHub issue here. I was surprised to see this title, because I thought "holy cow, finally someone else appreciates low input latency" and then I realized it was my issue haha.

By the way, wsltty 3.x also has excellent input latency now too. I've been using it for quite a while now with terminal Vim in WSL and it's about 90% as good as xterm on native Linux in terms of latency. wsltty also has no issues with tmux where as the MS terminal (both old and new) have severe issues with tmux.

Re: Typing inside of the default WSL terminal feels amazing (2018)

#37

I'm curious how alacritty compares to it. The alacritty devs basically consider another terminal app rendering faster than them to be a bug on their part ;-) But it does sound like it would be a good challenge.

Alacritty has kind of a lot of input latency, it's noticeably worse than wsltty and the default WSL terminal -- at least back when I checked it a year ago.

I think some work has been done to improve it, but at this point IMO if you're on Windows then wsltty is as good as it gets for a general purpose terminal. If you're on Linux, xterm is top notch.

Re: Typing inside of the default WSL terminal feels amazing (2018)

#38
post #22

Earlier quoted context omitted.

Note that this content is one year old. At that point, WSL was not a virtual machine, it was Linux syscall emulation in the NT kernel.

Does that mean it's faster or slower now?

In terms of key press latency it makes no difference. Both the old and new MS terminal have about the same input latency.

The problem is, the MS terminal doesn't work well with tmux which is a 100% deal breaker.

WSL2's I/O is better but that's out of scope for this discussion and also a pretty sketchy thing to run as of today since it requires opting into the insider's release of Windows which has very questionable telemetry requirements.

Re: Typing inside of the default WSL terminal feels amazing (2018)

#39
post #13

Earlier quoted context omitted.

It's faster and works better than old conhost.exe they're also planning to overhaul it with more modern features judging from its trailer[0] (yes, this terminal has a fancy 3D trailer) [0]: https://www.youtube.com/watch?v=8gw0rXPMMPE

The real app look nothing like this clip. Really awful, that I have go back to Cmder

I'd see that video more as a "where we want to head this tool in the future" rather than an actual showcase of its current state to be honest

Re: Typing inside of the default WSL terminal feels amazing (2018)

#40
post #34
post #28

Earlier quoted context omitted.

Wow your work laptop is up to 10 already? We've started to plan our migration.

Windows 7.1 extend support ends on January 14, 2020. So is your org planning a very fast rollout or is it paying $$$ for Extended Security Updates?

There is nothing called Windows 7.1. Windows 7 extended support ends January 14, 2020. Windows 8.1 won't end its extended support until January 10, 2023.
Post reply on HN