1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00
alacritty/alacritty_terminal/tests/ref/region_scroll_down
Christian Duerr ec42b42ce6
Use dynamic storage for zerowidth characters
The zerowidth characters were conventionally stored in a [char; 5].
This creates problems both by limiting the maximum number of zerowidth
characters and by increasing the cell size beyond what is necessary even
when no zerowidth characters are used.

Instead of storing zerowidth characters as a slice, a new CellExtra
struct is introduced which can store arbitrary optional cell data that
is rarely required. Since this is stored behind an optional pointer
(Option<Box<CellExtra>>), the initialization and dropping in the case
of no extra data are extremely cheap and the size penalty to cells
without this extra data is limited to 8 instead of 20 bytes.

The most noticible difference with this PR should be a reduction in
memory size of up to at least 30% (1.06G -> 733M, 100k scrollback, 72
lines, 280 columns). Since the zerowidth characters are now stored
dynamically, the limit of 5 per cell is also no longer present.
2020-11-05 04:45:14 +00:00
..
alacritty.recording Fix scroll down escape pulling lines from history 2020-06-25 09:50:17 +00:00
config.json Fix scroll down escape pulling lines from history 2020-06-25 09:50:17 +00:00
grid.json Use dynamic storage for zerowidth characters 2020-11-05 04:45:14 +00:00
size.json Add support for single line terminals 2020-09-27 22:36:08 +00:00