8 ms·
As someone who has dabbled in terminal emulation (I was the maintainer of Console Telnet for Win32 twenty years ago), I have respect for someone who takes the t
by cout 3y ago
As someone who has dabbled in terminal emulation (I was the maintainer of Console Telnet for Win32 twenty years ago), I have respect for someone who takes the time to optimize a terminal emulator by building a fast parser and being careful with screen updates.
That used to be the only way to make a graphical program fast, but these days hardware is so fast you can render an entire scene before the next screen refresh and still have cycles to spare. As long as you initiate rendering early enough, it's hard to go much faster.
I'm curious how foot compares to older fast terminal emulators such as Eterm, xterm, and rxvt. I think libvte is neat (anyone can write a terminal app now) but is it resulted in terribly slow programs like gnome terminal. Before that terminal emulators tended to be much faster -- they had to be, because hardware was so much more limited.
- doublepg23 3y agoIt’s interesting you call out GNOME Terminal, it’s always been my favorite terminal.
- jampekka 3y agoI don't think I've ever encountered a problem where terminal emulation would be too slow. What I do have encountered are terminal emulators that go bonkers and require some arcane configuration magic to figure out what to emulate. GNOME terminal works and looks pleasant to boot. In fact it works so well that I almost never think of it although I use it all the time.
- jeffbee 3y ago> I don't think I've ever encountered a problem where terminal emulation would be too slow. You don't notice it until you get into a situation where the terminal (emulator) insists on showing you everything flying by, instead of just skipping to the end, in which situation you may be waiting a really long time. Some emulators also cannot deal with, say, 1 million lines of scrollback and searching.
- jampekka 3y agoThat I've encountered a few times but tail or less deals with it fine.
- spookie 3y agoIt really depends on what you're doing frankly, sometimes you cannot use tail or less. Unfortunately.
- askiiart 3y agoThat's fine if you know that your logs or whatever will be very long, but if you're unaware of how long it is, or just don't think about it, it's easy to get caught in a situation where you have to wait for several seconds until you can use your terminal again. Related: this problem gets way worse over SSH. It would be nice if there was kind of SSH replacement that could just send what's currently on screen, plus some lines in each direction.
- ElectricalUnion 3y agomosh? It's a replacement for interactive ssh.
- chungy 3y agolibvte is a big reason that GNOME Terminal tends to be faster than competing terminal emulators, including xterm and rxvt. One of VTE's tricks is that it doesn't bother painting the screen if the contents are going to be overwritten in the next frame anyway; you can scroll through megabytes of data in fractions of a second this way. The idea that it's slow, that's new to me.
- audidude 3y agoI've heard various things about VTE over the years including: 1. They "like" xterm because i get value out of screen tearing and feeling like they can catch what is scrolling by (even though it's literally seconds slower) 2. They don't like the 40 fps cap it currently has because it predates reliable access to vertical sync information in applications. 3. They are using the GTK 4 port which draws with cairo and uploads surface data on every frame update. The patches I put together for VTE this week (while having some down time with Covid) address a portion of that by making it render fonts/rectangles/emoji/etc on the GPU using GTK's OpenGL renderer (which I also wrote a large portion of).
- rascul 3y agoI have a 655MB file with 1.5 million lines of lorem ipsum. I timed a cat in several terminal emulators. For this simple test, gnome-terminal beat xterm a little bit but wasn't anywhere close to the rest: foot 0m9.410s alacritty 0m16.881s konsole 0m36.737s gnome-terminal 1m1.096s xterm 1m16.919s Foot has an page that explains when and why it's fast, and also when it's not, compared to alacritty. https://codeberg.org/dnkl/foot/wiki/Performance https://codeberg.org/dnkl/foot/wiki/Performance
- audidude 3y agoGlad this Termkit prototype work is right on track then. Generated a 655MB lorem text file and it came out at 0m8.186s.
- somat 3y agoThere can be distinctly different run speeds between bulk entry dumb terminal and opcode heavy tui behavior. https://tomscii.sig7.se/2020/12/A-totally-biased-comparison-of-Zutty#performance-and-resource-usage https://tomscii.sig7.se/2020/12/A-totally-biased-comparison-... And I don't really care that much but I will say that while it is a bit of a dog in the bulk display race, no one beats xterm in the keyboard latency contest.
- DiabloD3 3y agorxvt used to be my go-to terminal, but it was only fast in the era where we had actual 2D hardware. That era ended, oh, like 15 years ago? Ish? On the AMD side, Radeon GCN 1.0 (think 7970) came out 12 years ago, and that was their first card that entirely removed 2D hardware (which means all 2D ops are handled by optimized shaders; in Linux, that'd be handled by glamor); but wasn't the first gen of AMD that was in the process of removing 2D, and nvidia was about a gen behind every step on that. Between then and now, I ended up trying every emulator. The libvte ones tended to be slow, buggy, and missing features (although, nowadays, it's sorta cleaned up its act, but not entirely). The terminal community has been able to write three emulators that make for good urxvt replacements: alacritty, wezterm, and kitty. Foot seems like its trying to join those three, but it's lack of other-OS support (since it's focusing on being, purely, the best possible Wayland terminal) kind of holds it back (unless you're only using Linux, then obviously this doesn't apply to you).
- walteweiss 3y agoNot just Linux, FreeBSD as well.
- arghwhat 3y agoBeing fast is not just about hitting the deadline for 60fps or more. Ingestion performance (cat /dev/urandom), startup time and overall latency are also important factors. There are a few terminal emulators that are fast enough that further optimization is mostly for the heck of it... And ugh, gnome terminal. The internet explorer of terminal emulators, only used to install foot and alacritty.
- somat 3y agozutty has an interesting article how it does it. https://tomscii.sig7.se/2020/11/How-Zutty-works https://tomscii.sig7.se/2020/11/How-Zutty-works
- jhoechtl 3y agoAnyone has experience with Gnomes new "default" terminal console? How is it feature-wise (compatibility with different terminal emulations) and performance-wise?