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
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.
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.
Please try to explain your performance issues, the author is active on HN and perhaps he could comment on it.
Host * !github.com
LocalCommand printf '\e]7;file://%n/\a'
PermitLocalCommand yesSeriously, I don't understand what the benefits are, if it's only "just as fast as Terminal.app".
But among those features is tmux integration and now python extension support.
IIRC iterm2 has a setting to disable gpu rendering while on battery which is almost certainly your issue.
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.
> 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.)
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.