Live data from Hacker News

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

github.com

101–110 of 123 posts

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

#101
post #43

Earlier quoted context omitted.

One frame of latency is not gratuitous; it's perfectly reasonable to not draw directly "ahead of the beam" and instead double-buffer. Otherwise you get a lot of tearing. I very much doubt the console is watching vsync either.

The extra frame that I mean is: console renders, vsync, compositor grabs it and renders, vsync. That is what happens on X11 with compositing AFAIK. Only one frame time / one vsync is really required before you consider specifics of the software involved. I've read somewhere that Windows also has an extra frame of latency for similar reasons as X11.

The answer is triple buffering and not using a compositor/ using triple buffering and a compositor that plays nice with it.

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

#102
WSL terminal is garbage. Here's what irks me:

* I click on the icon and I get a terminal up (nevermind that it doesn't accept focus on startup, so I start typing and the characters keep going to my task bar).

* I type in "clear && ls" and hit enter.

* My line of text vanishes and I'm left with a completely black terminal. If I scroll up with the mouse-wheel I can see what I should have seen (the output of ls).

* I press up (to step backward through my command history) and all the text vanishes again.

The only workaround I have is to run something like tmux, which is somehow smart enough to render the text on-screen.

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

#104
post #102

WSL terminal is garbage. Here's what irks me: * I click on the icon and I get a terminal up (nevermind that it doesn't accept focus on startup, so I start typing and the characters keep going to my task bar). * I type in "clear && ls" and hit enter. * My line of text vanishes and I'm left with a completely black terminal. If I scroll up with the mouse-wheel I can see what I should have seen (the output of ls). * I pr…

I agree, been trying to make this setup work for over a year now because I use Windows at work for a few things here and there but it's just not worth it really...

You would do much better to install Linux and virtualize windows, then you get the best of both worlds. it's great that windows decided to add a terminal after every other OS has had it for decades but I think this thread is a bit like having rose colored glasses on top of your drunk goggles because WSL and Windows terminal are still an ocean away from a usable low latency terminal environment compared even to OS/2 if we're being brutally honest...

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

#105
post #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…

How do you measure input latency?

In the tests I've done on most terminals it was an organic process.

I simply typed into the terminal and let my brain decide. I spent about an hour just flipping between different terminals / programs and doing a bunch of different types of typing tests. It was very very clear and repeatable to do a "better or worse?" test between them.

Typing fast, typing slow and also just holding down the key (this made the most noticeable difference). Terminals that have low input latency will appear to spit out characters liquid smooth if you hold down the key.

I also talked to some friends who use Windows and we came to the same conclusion in a blind test.

For measuring the latency numbers themselves, it was just making a best estimate based on how I perceive those values. I don't think the numbers matter as much as the "this feels better" or "this feels worse" test since in the end that's the deciding factor.

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

#107
post #88
post #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…

Thank you for providing the praise to the Windows Terminal team many of us know they deserve, allowing us to just click the thumbs-up response on GitHub. I truly wish more modern software were capable of reaching this level of latency performance. I understand the response provided by "miniksa" at GitHub, but I don't feel satisfied by it. The maintainers of the frameworks that are described as adding so much latency…

> I fear computer science is often encumbered by a corrosive culture of "good enough" with respect to performance.

I feel that's more of a "software engineering" mindset.

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

#108

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.

According to [1] xterm and mlterm achieve the best values for latency.

1.: https://lwn.net/Articles/751763/

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

#109
post #72

I really wish there was a way for the browser to blit pixels to the screen in the shortest amount of time possible. Like talking directly to the GFX hardware using a restricted API like the Canvas 2d context.

Sounds like it'd open up some security holes.

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

#110
post #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…

Can you post your computer specs? Because it's impossible for me to see any difference between the WSL terminal and Notepad. I can see a tiny difference compared with Electron apps, but I really need to concentrate to see it. My computer is no rocket, is a higher-end desktop from 6 years ago.

Try changing the theme to basic. In Windows 10, using the default theme added about 50ms in latency.
Post reply on HN