Go to file
Christian Duerr c6ed855bfa
Add buffer for PTY reads during terminal lock
Before this patch, Alacritty's PTY reader would always try to read the
PTY into a buffer and then wait for the acquisition of the terminal lock
to process this data. Since locking for the terminal could take some
time, the PTY could fill up with the thread idling while doing so.

As a solution, this patch keeps reading to a buffer while the terminal
is locked in the renderer and starts processing all buffered data as
soon as the lock is released.

This has halfed the runtime of a simple `cat` benchmark from ~9 to ~4
seconds when the font size is set to `1`. Running this patch with
"normal" grid densities does not appear to make any significant
performance differences in either direction.

One possible memory optimization for the future would be to use this
buffer for synchronized updates, but since this currently uses a dynamic
buffer and would be a bit more cluttered, it has not been implemented in
this patch.
2021-07-03 20:31:50 +00:00
.builds Run clippy on MSRV 2021-02-27 15:06:22 +00:00
.github Run clippy on MSRV 2021-02-27 15:06:22 +00:00
alacritty Fix clippy warnings 2021-07-03 03:06:52 +00:00
alacritty_config_derive Unify the grid line indexing types 2021-03-30 23:25:38 +00:00
alacritty_terminal Add buffer for PTY reads during terminal lock 2021-07-03 20:31:50 +00:00
docs Add vi/mouse hint highlighting support 2021-04-13 03:24:42 +00:00
extra Remove blink capability from terminfo 2021-06-26 13:10:20 +00:00
scripts Switch to flamegraph-rs script 2020-01-27 02:30:23 +03:00
.editorconfig Fix typo in .editorconfig 2020-12-14 06:46:28 +00:00
.gitattributes Add custom merge strategy for CHANGELOG.md 2020-02-15 13:25:02 +03:00
.gitignore Add editorconfig 2020-11-06 05:12:29 +03:00
alacritty.yml Add modes to regex hint bindings 2021-06-19 22:58:15 +00:00
Cargo.lock Update crossfont to 0.3.0 2021-05-01 20:06:23 +00:00
Cargo.toml Replace serde's derive with custom proc macro 2020-12-21 02:44:38 +00:00
CHANGELOG.md Add buffer for PTY reads during terminal lock 2021-07-03 20:31:50 +00:00
CONTRIBUTING.md Switch official IRC channel to Libera.Chat 2021-06-19 13:29:30 +00:00
INSTALL.md Add libxkbcommon-dev to debian INSTALL.md 2021-06-27 23:41:58 +00:00
LICENSE-APACHE Remove copyright notice from files 2020-06-06 21:49:14 +03:00
Makefile Add editorconfig 2020-11-06 05:12:29 +03:00
README.md Switch official IRC channel to Libera.Chat 2021-06-19 13:29:30 +00:00
rustfmt.toml Fix clippy issues 2019-08-16 01:33:49 +02:00

Alacritty Logo

Alacritty - A fast, cross-platform, OpenGL terminal emulator

Alacritty - A fast, cross-platform, OpenGL terminal emulator

About

Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.

The software is considered to be at a beta level of readiness; there are a few missing features and bugs to be fixed, but it is already used by many as a daily driver.

Precompiled binaries are available from the GitHub releases page.

Features

You can find an overview over the features available in Alacritty here.

Further information

Installation

Alacritty can be installed by using various package managers on Linux, BSD, macOS and Windows.

Prebuilt binaries for macOS and Windows can also be downloaded from the GitHub releases page.

For everyone else, the detailed instructions to install Alacritty can be found here.

Requirements

  • OpenGL 3.3 or higher
  • [Windows] ConPTY support (Windows 10 version 1809 or higher)

Configuration

You can find the default configuration file with documentation for all available fields on the GitHub releases page for each release.

Alacritty doesn't create the config file for you, but it looks for one in the following locations:

  1. $XDG_CONFIG_HOME/alacritty/alacritty.yml
  2. $XDG_CONFIG_HOME/alacritty.yml
  3. $HOME/.config/alacritty/alacritty.yml
  4. $HOME/.alacritty.yml

Windows

On Windows, the config file should be located at:

%APPDATA%\alacritty\alacritty.yml

Contributing

A guideline about contributing to Alacritty can be found in the CONTRIBUTING.md file.

FAQ

Is it really the fastest terminal emulator?

Benchmarking terminal emulators is complicated. Alacritty uses vtebench to quantify terminal emulator throughput and manages to consistently score better than the competition using it. If you have found an example where this is not the case, please report a bug.

Other aspects like latency or framerate and frame consistency are more difficult to quantify. Some terminal emulators also intentionally slow down to save resources, which might be preferred by some users.

If you have doubts about Alacritty's performance or usability, the best way to quantify terminal emulators is always to test them with your specific usecases.

Why isn't feature X implemented?

Alacritty has many great features, but not every feature from every other terminal. This could be for a number of reasons, but sometimes it's just not a good fit for Alacritty. This means you won't find things like tabs or splits (which are best left to a window manager or terminal multiplexer) nor niceties like a GUI config editor.

IRC

Alacritty discussions can be found in #alacritty on Libera.Chat.

License

Alacritty is released under the Apache License, Version 2.0.