Don't update cells in each block of data read from a pane immediately,

instead track them as change (dirty) and update them once at the end,
saves much time if repeatedly writing the same cell. Also fix comparison
of cells being equal in a few places (memcmp is not enough).
This commit is contained in:
nicm
2016-07-15 00:49:08 +00:00
parent 1fd6ca2260
commit 0f73af876f
5 changed files with 399 additions and 343 deletions

View File

@ -38,6 +38,9 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
s->ccolour = xstrdup("");
s->tabs = NULL;
s->dirty = NULL;
s->dirtysize = 0;
screen_reinit(s);
}
@ -64,6 +67,7 @@ screen_reinit(struct screen *s)
void
screen_free(struct screen *s)
{
free(s->dirty);
free(s->tabs);
free(s->title);
free(s->ccolour);