Moving from iTerm2 to Kitty for simplicity and performance

I love iTerm2, but it can be sluggish sometimes on my old late 2016 MacBook Pro. Plus, many of its features I never use. I had tried Alacritty before, but making it look and act like iTerm2 was a no-go. This time, I tried Kitty, and within two hours of work, it looked and behaved just like my iTerm2 configuration. This exploration was fueled by a performance comparison I came across that piqued my interest.

To really put Kitty to the test, I used my older MacBook Pro, deliberately looking for CPU usage spikes via fan noise and Activity Monitor. My "benchmark" was simple: opening an 800-line Rails schema and scrolling through it using Vim's Shift + ]. Unlike iTerm2, which often caused my fans to ramp up, Kitty handled the same tasks with significantly less strain on the CPU.

I quickly realized that syntax highlighting was a major bottleneck. To address this, I switched to vim-polyglot for faster Ruby syntax highlighting. The improvement was modest but noticeable. In a more unrealistic benchmark where I scrolled through the file quickly, latency was significantly reduced, and no more dropped frames were noticeable.

Configuration tweaks

To further optimize Kitty, I made several configuration tweaks:
- Integrated it into my dot-files as a git submodule .
- Set the text_composition_strategy to legacy to emulate the thin strokes from iTerm2. You can find the setting here .
- Used the Monokai Pro theme from kitty-themes for a familiar and visually appealing look.
- Kitty leveraging vector CPU instructions, enhancing its overall performance .

My Kitty configuration explained

Here are some specific Kitty configurations I used and what they do:

vim:fileencoding=utf-8:foldmethod=marker
# Ensures that the configuration file is encoded in UTF-8 and uses marker-based folding.

include ./theme.conf
# Includes an external theme configuration file for consistent theming.
font_family Berkeley Mono Variable
# Sets the font to Berkeley Mono Variable.
font_size 16.0
# Sets the font size to 16.0 points.
text_composition_strategy legacy
# Uses the legacy strategy for text composition, emulating thin strokes similar to iTerm2.

enable_audio_bell no
# Disables the audio bell to prevent sound alerts.
visual_bell_duration 0.0
# Sets the visual bell duration to zero, effectively disabling it.

Comparing the results: iterm2 vs kitty

If Kitty performs well under these stressful and unrealistic contexts, it will certainly be even faster on my M1 Pro MacBook Pro. Plus, the switch was a fun and rewarding project. Kitty not only matches the appearance and functionality of iTerm2 but also offers a performance boost that makes my old MacBook Pro feel more responsive and efficient.

Overall, I highly recommend giving Kitty a try if you're looking for a terminal emulator that combines simplicity and performance.

Tagged under: