1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -05:00
alacritty/tests/ref
Christian Duerr 3d7e88e8a9
Dynamically initialize grid storage
Previously Alacritty has initialized all lines in the buffer as soon as
it is started. This had the effect that terminals which aren't making
use of the scrollback buffer yet, would still consume large amounts of
memory, potentially even freezing the system at startup.

To resolve this problem, the grid is now dynamically resized in chunks
of `1000` rows. The initial size is just the visible area itself, then
every time lines are written to the terminal emulator, the grid storage
is grown when required.

With the worst-case scenario of having 100_000 lines scrollback
configured, this change improves startup performance at the cost of
scrolling performance.

On my machine the startup changes from ~0.3 to ~0.2 seconds.

The scrolling performance with large throughput is not affected, however
it is slowed down when the number of lines scrolled are close to the
100_000 configured as scrollback. The most taxing benchmark I've found
for this was running `yes | dd count=500 > 500.txt` (note the relatively
small file size). This will cause a slowdown on the first run from 0.05s
to 0.15s. While this is significant, it lines up with the time saved at
startup.

This fixes #1236.
2018-09-24 18:40:09 +00:00
..
csi_rep Optimize Row::reset 2018-06-02 09:56:50 -07:00
fish_cc Optimize Row::reset 2018-06-02 09:56:50 -07:00
grid_reset Dynamically initialize grid storage 2018-09-24 18:40:09 +00:00
history Optimize Row::reset 2018-06-02 09:56:50 -07:00
indexed_256_colors Optimize Row::reset 2018-06-02 09:56:50 -07:00
issue_855 Optimize Row::reset 2018-06-02 09:56:50 -07:00
ll Optimize Row::reset 2018-06-02 09:56:50 -07:00
newline_with_cursor_beyond_scroll_region Optimize Row::reset 2018-06-02 09:56:50 -07:00
tab_rendering Optimize Row::reset 2018-06-02 09:56:50 -07:00
tmux_git_log Optimize Row::reset 2018-06-02 09:56:50 -07:00
tmux_htop Optimize Row::reset 2018-06-02 09:56:50 -07:00
vim_24bitcolors_bce Optimize Row::reset 2018-06-02 09:56:50 -07:00
vim_large_window_scroll Optimize Row::reset 2018-06-02 09:56:50 -07:00
vim_simple_edit Optimize Row::reset 2018-06-02 09:56:50 -07:00
vttest_cursor_movement_1 Optimize Row::reset 2018-06-02 09:56:50 -07:00
vttest_insert Optimize Row::reset 2018-06-02 09:56:50 -07:00
vttest_origin_mode_1 Optimize Row::reset 2018-06-02 09:56:50 -07:00
vttest_origin_mode_2 Optimize Row::reset 2018-06-02 09:56:50 -07:00
vttest_scroll Optimize Row::reset 2018-06-02 09:56:50 -07:00
vttest_tab_clear_set Optimize Row::reset 2018-06-02 09:56:50 -07:00
zsh_tab_completion Optimize Row::reset 2018-06-02 09:56:50 -07:00