diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-11-05 04:45:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 04:45:14 +0000 |
commit | ec42b42ce601808070462111c0c28edb0e89babb (patch) | |
tree | 48006abca4497f66307f3b4d485bb1f162f4bf32 /CHANGELOG.md | |
parent | 9028fb451a967d69a9e258a083ba64b052a9a5dd (diff) | |
download | alacritty-ec42b42ce601808070462111c0c28edb0e89babb.tar.gz alacritty-ec42b42ce601808070462111c0c28edb0e89babb.zip |
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.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d3b92f..9b0b17a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Use yellow/red from the config for error and warning messages instead of fixed colors - Existing CLI parameters are now passed to instances spawned using `SpawnNewInstance` - Wayland's Client side decorations now use the search bar colors +- Reduce memory usage by up to at least 30% with a full scrollback buffer +- The number of zerowidth characters per cell is no longer limited to 5 ### Fixed |