1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00
wezterm/wezterm-gui
Wez Furlong d5d161b510 termwiz: add clustered line storage for line
Adds the option to use an alternative clusted line storage for
the cells component of the line.

This structure is not optimal for mutation, but is better structured
for:

* matching/extracting textual content
* using less memory than the prior simple vector

For some contrast: the line "hello" occupies 5 Cells in the cell based
storage; that 5 discrete Cells each with their own tiny string
and a copy of their attributes.

The clustered version of the line stores one copy of the cell
attributes, the string "hello" and some small (almost constant size)
overhead for some metadata.  For simple lines of ascii text, the
clustered version is smaller as there are fewer copies of the cell
attributes.  Over the span of a large scrollback and typical terminal
display composition, this saving is anticipated to be significant.

The clustered version is also cheaper to search as it doesn't require
building a copy of the search text for each line (provided the line is
already in clustered form).

This commit introduces the capability: none of the internals request the
new form yet, and there are likely a few call sites that need to be
tweaked to avoid coersion from clustered to vector form.
2022-07-23 12:03:00 -07:00
..
src termwiz: add clustered line storage for line 2022-07-23 12:03:00 -07:00
build.rs Improve RESIZE window_decoration on Windows 2022-03-26 07:27:54 -07:00
Cargo.toml add distro-defaults feature 2022-07-10 16:34:43 -07:00