From 8363e31953a346b3cd4141bf30a8d79d37ca2674 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 11 Aug 2010 07:34:43 +0000 Subject: Change the way backoff works. Instead of stopping reading from the pty when the client tty backs up too much, just stop updating the tty and only update the internal screen. Then when the tty recovers, force a redraw. This prevents a dodgy client from causing other clients to go into backoff while still allowing tmux to be responsive (locally) when seeing lots of output. --- tmux.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index e1cd0b7e..af731ff7 100644 --- a/tmux.h +++ b/tmux.h @@ -59,8 +59,8 @@ extern char **environ; /* Automatic name refresh interval, in milliseconds. */ #define NAME_INTERVAL 500 -/* Maximum data to buffer for output before suspending reading from panes. */ -#define BACKOFF_THRESHOLD 1024 +/* Maximum data to buffer for output before suspending writing to a tty. */ +#define BACKOFF_THRESHOLD 16384 /* * Maximum sizes of strings in message data. Don't forget to bump @@ -1017,6 +1017,7 @@ struct tty { #define TTY_UTF8 0x8 #define TTY_STARTED 0x10 #define TTY_OPENED 0x20 +#define TTY_BACKOFF 0x40 int flags; int term_flags; @@ -1126,6 +1127,8 @@ struct client { #define CLIENT_DEAD 0x200 #define CLIENT_BORDERS 0x400 #define CLIENT_READONLY 0x800 +#define CLIENT_BACKOFF 0x1000 +#define CLIENT_REDRAWWINDOW 0x2000 int flags; struct event identify_timer; -- cgit