mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
ec42b42ce6
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. |
||
---|---|---|
.. | ||
alt_reset | ||
clear_underline | ||
colored_reset | ||
csi_rep | ||
decaln_reset | ||
deccolm_reset | ||
delete_chars_reset | ||
delete_lines | ||
erase_chars_reset | ||
fish_cc | ||
grid_reset | ||
history | ||
indexed_256_colors | ||
insert_blank_reset | ||
issue_855 | ||
ll | ||
newline_with_cursor_beyond_scroll_region | ||
region_scroll_down | ||
row_reset | ||
saved_cursor | ||
saved_cursor_alt | ||
scroll_up_reset | ||
selective_erasure | ||
sgr | ||
tab_rendering | ||
tmux_git_log | ||
tmux_htop | ||
underline | ||
vim_24bitcolors_bce | ||
vim_large_window_scroll | ||
vim_simple_edit | ||
vttest_cursor_movement_1 | ||
vttest_insert | ||
vttest_origin_mode_1 | ||
vttest_origin_mode_2 | ||
vttest_scroll | ||
vttest_tab_clear_set | ||
wrapline_alt_toggle | ||
zerowidth | ||
zsh_tab_completion |