mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
When the data we have buffered to write to a terminal grows beyond a
reasonable amount (currently width * height * 8 bytes), discard all output to the terminal and start trying to redraw periodically instead. Continue with this until the amount of data we are trying to write falls to a low level again. This helps to prevent tmux sitting on a huge buffer of data when there are processes with fast output running inside tmux but the outside terminal is slow. A new client_discarded format holds the amount of data that has been discarded due to this mechanism. The three variables (when to start this, when to stop, and how often to redraw) are basically "works for me" at the moment, this is going in to see how it goes and if it causes problems for anyone else.
This commit is contained in:
4
format.c
4
format.c
@ -1154,7 +1154,9 @@ format_defaults_client(struct format_tree *ft, struct client *c)
|
||||
|
||||
format_add_tv(ft, "client_created", &c->creation_time);
|
||||
format_add_tv(ft, "client_activity", &c->activity_time);
|
||||
format_add(ft, "client_written", "%zu", tty->written);
|
||||
|
||||
format_add(ft, "client_written", "%zu", c->written);
|
||||
format_add(ft, "client_discarded", "%zu", c->discarded);
|
||||
|
||||
name = server_client_get_key_table(c);
|
||||
if (strcmp(c->keytable->name, name) == 0)
|
||||
|
Reference in New Issue
Block a user