5 ms·
Could someone explain to me terminal performance and what these numbers practically mean? It's a complete mystery to me. It's so incredibly variable, the fact t
by sonthonax 7y ago
Could someone explain to me terminal performance and what these numbers practically mean? It's a complete mystery to me. It's so incredibly variable, the fact that I notice variability as a user really perturbs me, it's 2019, and displaying a matrix of a few thousand characters is still a challenge.
I live in fullscreen iTerm, Tmux and Vim. I have 256 colours enabled. Vim has lazy redraw enabled. I'm on a 2018 MacBook pro. Scrolling is smooth only when connected to power (probably related to CPU throttling - but it's 2019 and it shouldn't matter). iTerm is significantly faster than Terminal when resizing Tmux panes and Vim windows. I've had similar issues on Linux.
The only terminal emulator that has decent performance scrolling and resizing Vim buffers Alacritty.
What's going on? Why is there a bottleneck here? Is it rendering the text? Is that still hard to do in 2019? I don't understand the technical challenge of parsing a protocol that would literally work on a real VT100 sans some escape sequences and colours.
- jakear 7y agoI have found iTerm to have very bad performance relative to Terminal.app. I honestly have no clue why its so popular, I cannot stand it.
- dijit 7y agoI agree with you, or, I did, until they switched to the metal renderer. Now iTerm is as fast as terminal.app (provided you use the same settings)
- bradknowles 7y agoSo, in this case, why would I prefer iTerm over Terminal.app? Seriously, I don't understand what the benefits are, if it's only "just as fast as Terminal.app".
- ShamelessC 7y agoIt has quite a few nice features that Terminal doesn't have. But yeah, if you don't need those features then just use Terminal.
- Cort3z 7y agoiTerm has very many features that are great for productivity which the default Terminal.app does not have.
- phailhaus 7y agoDid you read the release notes for 3.3? How many of those features are supported by Terminal.app?
- dijit 7y agoSpeed is secondary. iTerm has much richer features, even the hotkeys are super nice. But among those features is tmux integration and now python extension support.
- kmundnic 7y agoFor me it's about using tmux with the same commands as the native iTerm2 commands to split panes and other tasks. That way I can work on a server in the same way I work on my machine.
- jbverschoor 7y agoFor me it’s only 1 feature: the profiles window. I configure them as ssh to hosts. And then I have a decal/text in the corner + a color in the bg. But most importantly is the favorites manager
- uberduper 7y agoI do this in my ssh config to get what I assume is the same effect with the iTerm badge. Host * !github.com LocalCommand printf '\e]7;file://%n/\a' PermitLocalCommand yes
- liability 7y agoIt supports a 'quake mode', which is the only reason I use it.
- alextooter 7y agoAgree,I set the same key as in Quake,and full screen console drop down,which is very cool.
- rodorgas 7y agoI think that iTerm is prettier. The font rendering looks better to me.
- sys_64738 7y agoTmux integration.
- tazard 7y agoIs that really a nice feature? I live in tmux + iTerm, and have set up the integration but never really used/enjoyed is so I just disabled it. Not sure what I'm missing honestly
- yoz-y 7y agoFor me it is the Quake mode and triggers so I can turn output of the many tools I use into coloured and functioning URLs. (E.g. bug ids, pull requests and so on)
- Abishek_Muthian 7y agoMetal based iTerm2 on a low power intel CPU is one thing which doesn't make me miss Linux terminal on MacOS. I've put up a dedicated display for it and functions seamlessly. Please try to explain your performance issues, the author is active on HN and perhaps he could comment on it.
- txcwpalpha 7y ago> Scrolling is smooth only when connected to power (probably related to CPU throttling - but it's 2019 and it shouldn't matter). This likely isn't CPU throttling at all. iTerm by default uses the faster Metal renderer when your MBP is plugged in, and a different renderer when not. You can adjust this so that it always uses Metal by following the instructions on this page: https://gitlab.com/gnachman/iterm2/wikis/Metal-Renderer https://gitlab.com/gnachman/iterm2/wikis/Metal-Renderer If you live full time inside iTerm, I would highly recommend reading over the documentation and becoming fully familiar with the different aspects of it and what you can tweak. Despite it being something that merely "displays a matrix of a few thousand characters", it is still a very complex piece of software and knowing at least a basic level of its configuration will likely be worth it.
- uberduper 7y agoGive neovim a try. Along with iterm gpu rendering, it's quite fast even with syntax highlighting and cursorline. IIRC iterm2 has a setting to disable gpu rendering while on battery which is almost certainly your issue.
- wyclif 7y agoIf you know how to set it up, iTerm2 + NeoVim + tmux + zsh is a pretty tasty combination.
- IfOnlyYouKnew 7y agoThere are (at least) two different things people mean when talking about terminal performance. What's measured above is latency, i. e. the time from keypress to the letter appearing on screen. I must say I rarely actively notice any delay, except when the system is slow or I'm working remotely and the delay is above, say, 1/3 of a second. I was, however, surprised by how notable no delay can be if you ever get to experience it. In my case, this was typing in an UEFI shell. I can't measure the delay there, and it's surprising that the difference from 5.0ms to, at best, 0ms is noticeable at all. There is also throughout. Some programs have real problems rendering large amounts of output, i. e. when tail'ling logs. This was a significant problem with Hyper, for example, but they have changed the backend library and it's fine now. I believe the reason here is usually a lack of bouncing, i. e. rendering for every new character even if they arrive faster than the refresh cycle. It's not entirely unreasonable that rendering takes some time. Terminals have evolved and, as but one example, character widths now vary even when using monospaced fonts (non-ascii characters, emojis, whatever). Then, there are fancy additions like ligatures, transparency effects, etc.
- emmelaich 7y agoDo you have syntax on in Vim? It can be super slow. I've compared scrolling in Vim and Emacs on the same (large) json file and Vim is painful and Emacs is almost immediate.
- deathanatos 7y ago> displaying a matrix of a few thousand characters is still a challenge. > I don't understand the technical challenge of parsing a protocol that would literally work on a real VT100 sans some escape sequences and colours. We definitely ask a lot more of a terminal today then we did of a VT100. First, it's not really a grid anymore: double-width CJK characters and emoji break that assumption a bit (though it still holds if you just consider them as 2-column glyphs). Our fonts are nicer: we have vectors not bitmaps, anti-aliasing, ligatures, combining accents. Color, but also effects like bold/italics. iTerm2 is also capable of images (even before this release, which added sixel graphics; it can output some other format (PNG?) with a special escape.) iTerm2 will dynamically wrap lines (it remembers where actual  chars are, and if you resize, it can re-wrap the lines appropriately). It can pick out URLs, and make them easily clickable/copyable. It tracks the timestamp of each line of output (press ⌘⇧E by default, or View → Show Timestamps). And it's doing this on top of an OS that is also mux'ing your display out to multiple applications (windows), shared with the same CPU that is driving the programs emitting the output into the terminal (it's not dedicated hardware). And the terminal protocol is not really simple… some aspects of it rely on how fast input comes from (this only happens on the input side, I think, and there's a varieties of "if this, then this sequences means X, otherwise it means Y". I too would ask for better perf from iTerm2 (I get much better perf from Terminator on Linux — but it doesn't have quite the featureset that iTerm2 has, I think) but I do think that there's a lot more going on than one might give the emulator credit for. > The only terminal emulator that has decent performance scrolling and resizing Vim buffers Alacritty. I've not used Alacritty, but my understanding is that it (intentionally) has a much narrower feature set to support. (I personally prefer something feature-ful like iTerm2.) > I'm on a 2018 MacBook pro. I've actually wondered if this is part of it. I get low perf from not just iTerm2, but my system in general. I've looked for, and not really found, a way to see what the core temps are (I've mostly found this, but the numbers are rough) and whether it is being thermally limited (I have no idea). The MBP's limited intake/exhaust areas just feel to me that they would significantly limit the thing's ability to dissipate heat. (E.g., my Lenovo has much more surface dedicated to airflow, and I seem to get better perf from it. The Lenovo also gets hotter too, so… IDK. But it also runs Linux and Terminator, so it's hardly an apples-to-apples comparison.)