Long overdue change to the way we store cells in the grid: now, instead

of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.

This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.

The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.
This commit is contained in:
nicm
2015-11-13 08:09:28 +00:00
parent e71a915412
commit c5689a5a40
12 changed files with 297 additions and 282 deletions

View File

@ -76,7 +76,6 @@ SRCS= alerts.c \
control-notify.c \
environ.c \
format.c \
grid-cell.c \
grid-view.c \
grid.c \
input-keys.c \