mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 23:21:08 +03:00
d5d161b510
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. |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml |