c6ed855bfa
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. |
||
---|---|---|
.. | ||
config | ||
grid | ||
term | ||
tty | ||
ansi.rs | ||
event.rs | ||
event_loop.rs | ||
index.rs | ||
lib.rs | ||
selection.rs | ||
sync.rs | ||
thread.rs | ||
vi_mode.rs |