alacritty/alacritty_terminal/src
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
..
config
grid Improve rendering performance 2021-05-22 22:48:43 +00:00
term Fix clippy warnings 2021-07-03 03:06:52 +00:00
tty
ansi.rs Fix out of order terminal query responses 2021-04-17 23:20:13 +00:00
event.rs Fix out of order terminal query responses 2021-04-17 23:20:13 +00:00
event_loop.rs Add buffer for PTY reads during terminal lock 2021-07-03 20:31:50 +00:00
index.rs
lib.rs Fix clippy warnings 2021-07-03 03:06:52 +00:00
selection.rs Improve rendering performance 2021-05-22 22:48:43 +00:00
sync.rs Add buffer for PTY reads during terminal lock 2021-07-03 20:31:50 +00:00
thread.rs
vi_mode.rs Fix ScrollHalfPageUp vi cursor motion regression 2021-06-16 08:55:15 +00:00